Salahuddin Bayassi

AI engineering · 2025

Data-to-Policy

A LangGraph team of five agents that turns a dense 100-page report into a two-page executive brief, and keeps rewriting until a reviewer agent approves it.

Role
Solo: agent design, prompts, evaluation
Stack
LangGraph, Groq LPU, Llama-3.3-70B, Pydantic, Python
Year
2025
Status
Prototype
pages, report to brief
100→2
specialised agents
5
verified facts per brief, schema-checked
5
State graph of five agents, with a loop from the reviewer back to the drafter

Intended use

Policy teams receive reports far longer than anyone has time to read.

Data-to-Policy turns a long socio-economic report into a two-page brief a decision-maker can act on. The hard part is trust: single-shot prompts drop statistics or invent them. So the work is split across agents with narrow jobs, the facts are schema-checked, and a reviewer can send drafts back until they hold up.

Architecture

chunks5 factsrejectedapprovedRaw PDFIngestorExtractorPolicy analystDrafterDirector reviewExecutive brief
System diagram: data flows left to right

Decisions

  1. A graph, not a prompt. LangGraph models the work as a state machine, so every brief passes the same steps in the same order.
  2. Facts are typed. The extractor must return exactly five statistics that validate against a Pydantic schema, or the run fails loudly.
  3. A reviewer with veto. The director agent rejects drafts with a written critique, and the drafter rewrites only the parts it criticised.
  4. Fast inference makes loops affordable. Running Llama-3.3-70B on Groq keeps a three-round review loop within seconds.

Results & evaluation

pages, report to brief
100→2
specialised agents
5
verified facts per brief, schema-checked
5
The LangGraph state machine rendered as nodes and directed edges
Agent state graph
A two-page brief beside a tall stack of source report pages
100 pages in, 2 out

Limitations & next steps

  • Quality is judged by the reviewer agent and by hand; there is no labelled benchmark yet.
  • Tables and charts in source PDFs are read as text and can lose structure.
  • Next: citation links from every claim back to the source page.
Next project · Full-stackNexus