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.
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
Architecture · 5 stages
- 01
Intake
Public and field endpoints
- 02
Route
Temporal classifier: past vs. planned
- 03
Retrieve
Pinecone namespaces per audience
- 04
Generate
Claude / OpenAI grounded answers
- 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
Related services
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.