Sheet 01 / 06
LLM Chat Platform
An extensible LLM interaction platform: multiple providers, hybrid RAG, streaming, persistence, evaluation and observability.
- Status
- In development
- Type
- Independent project · Applied AI platform engineering · since December 2025
- Repository
- matudasilva/llm-chat-platform
Architecture
Problem
Putting LLMs into an application takes more than one API call: you need more than one provider with fallback, persisted conversations, context retrieval whose quality you can measure, streamed responses, and visibility into what happens on every request.
Architecture
- Multi-provider layer: an abstraction that integrates different model providers and manages their execution. Providers used: OpenAI (including GPT-4o-mini) and Amazon Bedrock (including Nemotron Nano 12B v2). Cross-provider fallback has been tested.
- Streaming and persistence: responses over Server-Sent Events; conversations persisted in PostgreSQL with message sequencing and conversational state; endpoints for interaction and usage logging.
- Routing and fallback: a routing layer with a static default policy and a resilient provider with single-hop fallback, only before the first token. The dynamic routing policy is prepared and not enabled.
- Hybrid RAG: BM25 combined with dense embeddings (OpenAI
text-embedding-3-small), candidate retrieval, ranking and context assembly. Evaluated configurations includetop_k=20andtop_n=5. - Observability: OpenTelemetry, instrumentation, usage events, request tracking and evaluation evidence.
Evaluation
Evaluations of retrieval quality, ranking behavior, query variations, English/Spanish retrieval differences, regressions, RAG correctness, model and provider behavior, and conversational history. The test suite has grown past 200 tests.
Status
In development. It is an independent project, not a product deployed at scale: some evaluations and acceptance criteria remain open.
Stack
- Python
- FastAPI
- PostgreSQL
- SQLAlchemy
- Redis
- Docker
- pytest
- OpenTelemetry
- SSE
- OpenAI API
- Amazon Bedrock
- BM25
- Embeddings