Case study Government & public sector
National Political RAG AssistantA national-scale AI assistant serving citizens and field teams from one knowledge base.
A dual-endpoint RAG assistant for public and field audiences, with temporal query routing and namespace retrieval, built for 10,000+ queries a day.
- Client
- National political organization, West Africa
- Sector
- Government & public sector
- Engagement
- End-to-end design and build
- Our role
- Architecture, retrieval design and backend engineering
Interface recreation · client data anonymized
- queries a day, by design
- 10,000+
- queries a day, by design
- audience-specific endpoints
- 2
- audience-specific endpoints
- routing: past vs planned programs
- Temporal
- routing: past vs planned programs
(01) The challenge
What needed solving.
A national political organization in West Africa needed one AI assistant that could speak accurately to two very different audiences: members of the public asking about the organization's record and programs, and field teams who need precise, operational answers.
The same question can have different correct answers depending on time: what was delivered in the past versus what is planned for the future. A generic chatbot blurred the two, and at national scale the system had to stay fast and consistent across thousands of daily conversations.
(02) The solution
What we built.
We designed a dual-endpoint architecture, public and field, on a single governed knowledge base. Namespace-based retrieval in Pinecone keeps each audience's content and depth separate while sharing common sources.
A temporal query router classifies each question as being about past achievements or future programs and retrieves from the right time-scoped namespace before generation. Claude and OpenAI models are orchestrated behind a Flask API sized for more than 10,000 queries a day.
(03) Architecture
How the system fits together.
01 · Audiences
- Public endpoint
- Field-team endpoint
02 · Route
- Temporal classifier
- Past vs future
- Audience namespace
03 · Retrieve
- Pinecone namespaces
- Governed sources
04 · Generate
- Claude & OpenAI
- Grounded answer
05 · Scale
- Flask API
- 10,000+ queries/day
(04) Engineering decisions
The choices that made it work.
- 01
Temporal routing
Questions are classified by time orientation, so answers about past results never mix with future commitments.
- 02
Namespace isolation
Audience-specific namespaces deliver context-appropriate answers from one source of truth.
- 03
Multi-model orchestration
Claude and OpenAI models are each used where they perform best, behind one API.
(05) Results
What the client got.
- Dual public and field endpoints served from a single knowledge base
- Temporal routing that separates past achievements from future programs
- Architecture sized for more than 10,000 queries a day
- Context-appropriate answers for two very different audiences
Technology
- Claude (Anthropic)
- OpenAI
- Pinecone
- Python
- Flask
Services involved
Go deeper
Related case studies
Datagreffe Justice
An enterprise legal AI platform for 50,000+ court decisions
- court decisions indexed
- 50,000+
- court decisions indexed
- PII detection accuracy
- 98%
- PII detection accuracy
- data-protection & OHADA compliance
- 100%
- data-protection & OHADA compliance
AI Sponsor
A 24/7 AI recovery-support SaaS with WhatsApp voice and ~90% lower token costs
- lower input-token cost
- ~90%
- lower input-token cost
- text and voice support
- 24/7
- text and voice support
- automated test categories
- 12
- automated test categories
Conversational AWS Infrastructure Agent
Natural-language cloud operations on Amazon Bedrock, with confirmation before every change
- CLI commands required
- 0
- CLI commands required
- changes confirmed before execution
- 100%
- changes confirmed before execution
- enterprise model access
- Bedrock
- enterprise model access
Taking on new projects
Let’sbuild.
Want results like these? Let's talk.
Book a free 30-minute strategy call with our founder. You’ll leave with a clear view of the right architecture, timeline and next step, whether or not we work together.
- Reply within 24 hours
- NDA before you share anything confidential
- You own the code, prompts and documentation
- Hours overlap with US, UK, EU and Gulf teams