Generative AI platform
Model routing, tool calling, a custom MCP server, and RAG over vector databases.

- Architect
- Pure Billion Technologies
TL;DR
- A production-grade LangChain platform with model routing across multiple fine-tuned models.
- Categorised prompt orchestration, conversation context management and tool calling, including a custom MCP server for real-time web search.
- RAG pipelines over vector databases improved response relevance and accuracy by 25%.
- +25%
Life of a request
Client
user prompt
Model router
Orchestrator
MCP tools
Retrieval
Answer
A question arrives
The client sends the user's message with the conversation id, so earlier turns can be pulled into context.
{ "conversation": "c_19", "message": "What changed in the refund policy this month?" }The problem
Different kinds of questions need different models, prompts and context. A single general prompt to a single model left answers generic and, for anything time-sensitive, out of date.
The platform needed to send each request to the right model with the right context, let models call tools for fresh information, and ground answers in the company's own data.
Architected the platform and its retrieval pipelines.
How it works
Model routing
Each request is classified and routed to one of several fine-tuned models.
Prompt orchestration
Categorised prompt templates combine with managed conversation context for that model.
Tool calling over MCP
Models call tools through a custom MCP server, including real-time web search, with room to plug in new tools.
Retrieval-augmented generation
Answers are grounded in relevant chunks retrieved from vector databases before the response streams back.
Key decisions
Route across multiple fine-tuned models
Matching request categories to specialised models and prompts keeps answers on-topic for each kind of question.
A custom MCP server for tools
MCP gives tools a standard interface, so new integrations plug in without changing the orchestration code.
Ground answers with RAG
Retrieval over the company's own data is what moved response relevance and accuracy by 25%.
Outcomes
- +25% response relevance and accuracy from the RAG pipelines.
- Extensible tool integration through MCP, starting with real-time web search.
Stack and links
Stack
- LangChain
- MCP
- Vector databases
- RAG