b.peres

Bárbara M. Peres · Full-Stack Developer & AI Engineer, Portugal

The interactive version of this page did not load. Reloading usually fixes it. Otherwise the links below still reach me.

Master's Dissertation · 2024–2026

NourishGraph

Can architecture alone make an AI agent safe?

Team
Solo · Supervisor: Prof. Vítor Santos
My role
Researcher & Implementer
Stack
Python · LangGraph · GPT-4o-mini · Pinecone
  • 0 to 100% Verifiable citations
  • 85.8 SUS usability score (A+ band)
  • +62.5 Net Promoter Score

Master's dissertation (NOVA IMS). NourishGraph is a multi-agent nutrition assistant. Its safety comes from a five-layer LangGraph architecture, with a planner, specialist agents and a neurosymbolic reflection layer, rather than from fine-tuning the model. Before any health answer reaches the user it has to pass six deterministic validators and trace back to a corpus of 88 peer-reviewed papers.

Python · LangGraph · GPT-4o-mini · Pinecone · bge-reranker-v2-m3 · FastAPI · PostgreSQL · React · Hybrid RAG · Neurosymbolic · LLM Evaluation

The problem

Agentic AI gives a language model autonomy, planning and tool use. In a health-adjacent domain that autonomy is the problem. Evidence gets hallucinated, provenance is weak, and nothing bounds what the system will answer. The dissertation asks whether architecture on its own can govern that behaviour, with no fine-tuning of the model. The design principle it advances is architectural governance: deterministic, inspectable structure as the primary lever for keeping an agent bounded, evidence-grounded and auditable.

What I did

A PRISMA systematic review of 19 peer-reviewed studies set the design constraints. NourishGraph implements them as a deterministic LangGraph state machine with five layers: API, Control (query analysis → planner at τ = 0.7 → router), five specialist agents, a neurosymbolic Reflection Layer and a Synthesizer.

Six deterministic validators then score every candidate response: medical boundary (0.25), citation grounding (0.20), profile consistency (0.20), tone safety (0.15), completeness (0.10) and numerical plausibility (0.10). The validators evaluate rather than correct. That keeps the execution path linear and guarantees termination.

Evidence comes from hybrid retrieval over 88 peer-reviewed papers (5,366 chunks) held in Pinecone, with dense and sparse search fused at α = 0.7 and reranked by bge-reranker-v2-m3. Citations that cannot be traced to a retrieved passage are stripped before delivery.

All numerical work is delegated to Python tools rather than generated by the model. FastAPI, PostgreSQL and React sit around the graph.

The result

To find out whether the constraints were doing the work, I ablated them. With tool delegation off, the deterministic calculations went away. Turning off retrieval cost the verifiable citations. Against the same model invoked unconstrained, the architecture took verifiable citations, retrieval grounding and scope rejection from 0% to 100%.

Sixteen participants (10 general users, 6 healthcare professionals) returned an SUS of 85.8 (A+ band) and an NPS of +62.5.

The contribution I am most careful about is the constraint-to-perception pathway: safeguards that produced verifiable technical effects tracked with user-perceived trust. It is formative and post-hoc. Indicative, not statistically generalisable. The thesis treats it as hypothesis-generating for a controlled within-subjects study.

All projects