OpenGov summary: Difference between revisions

3,900 bytes added ,  Wednesday at 23:56
Line 76: Line 76:


== Safeguards ==
== Safeguards ==
OpenGov Encyclopedia is engineered from the ground up to deliver '''authoritative, trustworthy, and neutral''' structured data as a supplemental truth layer—while strictly adhering to federal compliance, risk management, and public trust standards.


* '''Authoritative sourcing only''': Pulls exclusively from official federal sources — Federal Register API, eCFR, USAspending APIs, agency databases, and the full inventory of .gov domains/subdomains from CISA's current-federal.csv whitelist (~1,000+ executive branch domains, including major agencies like EPA, NASA, FEMA, NOAA, and their subdomains).
=== Authoritative sourcing only ===
* '''AI-first with government-grade rigor''': Leverages Grok (via existing GSA OneGov agreement at $0.42/agency through March 2027) in a dual-AI pipeline (Grok as primary generator + complementary model like ChatGPT Enterprise or Gemini for Government as verifier). Offsets perceived biases for neutrality; populates only verifiable fields (progressive completeness — core entity data always included, optional details filled as confidence grows).
All content ingestion is locked to verified official federal sources, eliminating external risks. This includes:
 
* public .gov websites from CISA's '''current-federal.csv''' whitelist (~1,000+ executive branch entries, covering major agencies like EPA, NASA, FEMA, NOAA, and their sub-agencies/subdomains such as airnow.gov or noaa.gov sub-sites),
* Federal Register API (for regulations and notices)
* eCFR (electronic Code of Federal Regulations)
* USAspending.gov APIs (for funding and awards data)
* Agency-specific databases and feeds (e.g., FEMA declarations, NOAA data portals, HHS TAGGS grants)
 
Note: While the U.S. Digital Registry was considered for social media validation, it has been deprecated since September 2024 and is no longer updated, so it is not incorporated.
 
=== Dual-AI pipeline ===
{{Nutshell|Together, they ensure the knowledge graph and wiki pages are as reliable as possible for citizens and agency AI systems.}}
In the dual-AI pipeline used by OpenGov Encyclopedia, two large language models (LLMs) work together in a structured, collaborative process to create and check content. This setup is designed to produce accurate, reliable summaries, relationships, and structured data from official .gov sources while minimizing errors like hallucinations (where an AI invents details).
 
The pipeline has two main roles:
 
* Generator AI
* Verifier AI
 
==== Generator AI ====
 
* - This is the "creator" or "drafter" model.
* - It starts by reading the retrieved official content (e.g., text from a Federal Register notice, an agency program page, or USAspending data).
* - Using retrieval-augmented generation (RAG) techniques, it synthesizes that information into a draft:
**   - Fills in the structured **Cargo template fields** (e.g., program name, sponsoring agency, authorizing legislation, funding amount).
**   - Writes a concise narrative summary for the MediaWiki page.
**   - Proposes relationships (e.g., "This program links to Statute X and Agency Y").
* - Its job is to be creative and comprehensive—turning raw source material into coherent, usable wiki content and graph data—while staying grounded in what was retrieved.
 
==== Verifier AI ====
 
* - This is the "checker" or "fact-checker" model.
* - It runs **independently** after the generator finishes its draft.
* - It goes through every part of the draft step-by-step:
**   - Compares each claim, field value, and relationship directly against the original source documents.
**   - Scores for factual accuracy (e.g., does the funding number match exactly?).
**   - Checks citation completeness (is every key fact traceable?).
**   - Evaluates logical consistency and neutrality (no unsupported assumptions or biased phrasing).
* - It gives an overall confidence score and flags any mismatches, gaps, or potential issues.
* - If both AIs agree at a high threshold (≥95% confidence), the draft auto-publishes as a new page revision.
* - If there's disagreement or low confidence, the item flags for quick human review (one-click approve/reject/retry on the Clearance Dashboard).
 
==== Why This Two-Step Approach? ====
 
* - A single AI can sometimes confidently produce wrong or invented details (a common issue in LLMs).
* - By having one model **create** and a different model **critically review**, the system catches more errors—studies on multi-agent or dual-LLM verification show significant reductions in hallucinations (often 60-90% in similar pipelines).
* - Alternating roles (e.g., Grok drafts one time, Gemini verifies; next time they swap) adds extra robustness by avoiding patterns from one model's weaknesses.
* - In OpenGov Encyclopedia, this keeps the process fast and mostly automated (~80-95% hands-off) while meeting federal needs for defensibility, traceability, and neutrality.
 
In short:  
 
* - **Generator** → Builds the draft from official sources.  
* - **Verifier** → Double-checks it rigorously before anything goes live.  
 
=== TBD ===
It will use two different AIs
*
* Leverages Grok (via existing GSA OneGov agreement at $0.42/agency through March 2027) in a dual-AI pipeline (Grok as primary generator + complementary model like ChatGPT Enterprise or Gemini for Government as verifier). Offsets perceived biases for neutrality; populates only verifiable fields (progressive completeness — core entity data always included, optional details filled as confidence grows).
* '''Zero-base burden model''': ~80-95% automated (event-driven updates from source changes, daily gap scans); human role limited to <5% escalations (one-click approve/reject via Clearance Dashboard). No manual writing; full audit trails and immutable revisions for FOIA/NARA compliance.
* '''Zero-base burden model''': ~80-95% automated (event-driven updates from source changes, daily gap scans); human role limited to <5% escalations (one-click approve/reject via Clearance Dashboard). No manual writing; full audit trails and immutable revisions for FOIA/NARA compliance.