Skip to content

Case study · Government & Public Sector

High-Volume Public-Sector RAG Assistant

A dual-endpoint RAG assistant that serves the public and the field teams of a national political organization from one governed knowledge base. It is sized for 10,000+ queries a day, with temporal query routing and namespace-isolated retrieval.

Client
National political organization · West Africa
Project
Civic Intelligence Assistant
Status
Delivered
Queries per day capacity
10K+
Audience-specific endpoints
2
Governed knowledge base
1

The challenge

The organization needed one AI assistant for two very different audiences: citizens asking about policies and programs, and field teams who needed operational detail.

Answers had to separate what had already been delivered from what was planned, field-only content could never reach the public, and the system had to hold up under peak public interest.

civic-assistant · dual endpoint
10K+/day
“When does the youth scholarship program expand?”temporal router → planned

Publicns: public

The expansion is part of the next program cycle. Eligibility criteria and official announcements are listed on the program page.

2 public sources

Field teamns: field

Rollout guidance for coordinators: priority regions, required documents and the household briefing checklist.

3 field sources · restricted

one knowledge base · two namespacesno cross-audience leakage

Illustrative interface · client data never shown

Architecture · 5 stages

  1. 01

    Intake

    Public and field endpoints

  2. 02

    Route

    Temporal classifier: past vs. planned

  3. 03

    Retrieve

    Pinecone namespaces per audience

  4. 04

    Generate

    Claude / OpenAI grounded answers

  5. 05

    Serve

    Flask API, 10K+ queries/day

The solution

I designed a dual-endpoint architecture, one public and one for field teams, over a single knowledge base in Pinecone. The base is partitioned into namespaces so each audience retrieves only the content it is entitled to.

A temporal router classifies every question as past- or future-facing and steers retrieval to delivered-program or forward-program data, so answers stay accurate about what has happened versus what is promised.

Generation runs on Claude and OpenAI models behind a Flask API sized for 10,000+ queries per day.

Engineering highlights

  • Dual endpoints, public and field, from one source of truth
  • Namespace-isolated retrieval: no cross-audience leakage
  • Temporal query routing for past vs. planned programs
  • Multi-model generation with Claude and OpenAI
  • Capacity planned for 10,000+ queries per day

Technology

  • Python
  • Flask
  • Pinecone
  • Claude API
  • OpenAI

Building something similar?

Get a candid view of the architecture, risks and timeline on a free 30-minute call, or ask the AI assistant how this approach would map to your project.

Book a discovery call
Available for new engagements

Have an AI initiative in mind? Let’s scope it in 30 minutes.

Free discovery call. You'll leave with a clear view of the architecture, risks and next steps, whether or not we work together. I reply within 24 hours.

Not ready to talk yet? Get an instant project plan.