Skip to content

fhitzke/Applied-LLM-Engineering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Applied-LLM-Engineering

A collection of Python artifacts demonstrating practical skills in building GenAI and LLM-powered applications. The focus is on clean, typed, production-oriented code. I make use of dataclasses, typed pipelines, and structured API integration, rather than framework abstractions. The artifacts are built as preparation for and demonstration of real-world AI (LLM) engineering tasks.

Stack

Component Details
Language Python 3.13.3
LLM access OpenAI Python SDK (openai)
Local inference Ollama, runs models locally via an OpenAI-compatible API endpoint (http://localhost:11434/v1)
Chat model llama3.2 (local)
Embedding model nomic-embed-text (local)
Core libraries numpy, dataclasses, pathlib, typing

All artifacts are developed against Ollama locally. Switching to the OpenAI API requires only changing the client initialization. All pipeline code is provider-agnostic.

Running locally

# 1. Install Ollama and pull models
ollama pull llama3.2
ollama pull nomic-embed-text
ollama serve

# 2. Install Python dependencies
pip install openai numpy

# 3. Run any artifact
cd cli_chatbot/
python main.py

Content

Artifact File Description
CLI Chat Assistant /cli_chatbot/src/chat_assistant.py Stateful chat assistant with conversation history, system prompt configuration, and full streaming support via the OpenAI chat completions API. Demonstrates typed history management, @property encapsulation, and clean error handling across multi-turn conversations.
NER Extractor /ner_extractor/src/entity_extractor.py Named entity recognition pipeline that extracts structured entities (person, organisation, location, date, product) from raw text using a JSON-mode LLM call. Parses responses into typed dataclasses and supports both single and batch extraction.

Design Principles

  • Typing: Every function and method is fully annotated with typing and dataclasses
  • Provider-agnostic: Client swap moves the entire stack from local Ollama to OpenAI
  • No framework dependencies: No abstraction through e. g. LangChain; All patterns are implemented directly against the OpenAI SDK and numpy

About

A collection of Python artifacts demonstrating practical skills in building GenAI and LLM-powered applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages