Skip to content

ronishgeorge/neuron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neuron

Citation-grounded AI for athletes — performance nutrition, supplementation, recovery, and training.

Neuron answers performance and nutrition questions with every claim traced to an authoritative source. No hallucinated facts. No vague "studies suggest." Every sentence is grounded in USDA FoodData Central, NIH MedlinePlus, CDC, WHO, or peer-reviewed research from PubMed.

If the corpus doesn't support an answer, Neuron tells you that. It refuses to guess.

Built by a two-person team starting August 2024.


Why Neuron exists

The science around athletic performance — creatine, electrolyte loading, sleep, recovery, macronutrient timing — lives mostly in journal archives that athletes never read. General-purpose AI (ChatGPT, Claude, Gemini) was never designed to be medically trustworthy: it synthesizes from training data without telling you where each claim came from. For something as consequential as what an athlete puts in their body, "sounds plausible" is not a standard.

Neuron is built on a different premise: every claim cites its source, or it doesn't get said.

How it works

                ┌───────────────────────────────┐
                │  Question (e.g. "loading dose │
                │  for creatine?")              │
                └───────────────┬───────────────┘
                                ▼
                ┌───────────────────────────────┐
                │   Retrieval (Pinecone)        │
                │   over a curated corpus:      │
                │   • USDA FoodData Central     │
                │   • NIH MedlinePlus / ODS     │
                │   • CDC public guidance       │
                │   • WHO topic pages           │
                │   • PubMed open-access        │
                └───────────────┬───────────────┘
                                ▼
                ┌───────────────────────────────┐
                │   Synthesis (GPT-4o)          │
                │   with mandatory inline       │
                │   citations [source-id]       │
                └───────────────┬───────────────┘
                                ▼
                ┌───────────────────────────────┐
                │   Grounding verifier          │
                │   (second-pass LLM check)     │
                │   Every claim must map to a   │
                │   cited passage or be cut.    │
                └───────────────┬───────────────┘
                                ▼
                ┌───────────────────────────────┐
                │   Answer + Source panel       │
                │   • inline [PubMed, 2023]     │
                │   • clickable source list     │
                │   • "I don't know" if unsupp. │
                └───────────────────────────────┘

What's inside

  • Source ingestion pipelines — clients for USDA FoodData Central, NIH MedlinePlus, CDC, WHO, and PubMed E-utilities. All sources are public-domain or open-access.
  • Citation-enforced RAG — every claim in the answer must point to a retrieved passage. System prompt rejects ungrounded statements.
  • Grounding verifier — a second-pass LLM evaluates whether every sentence in the candidate answer is supported by the cited context. Unsupported claims are excised before serving.
  • Refusal behavior — if retrieval scores fall below threshold or the verifier rejects every claim, Neuron tells the user it doesn't have a reliable source. It does not guess.
  • Source freshness — each ingested document carries last_verified metadata. Stale sources are flagged in the UI.
  • Domain lock — system prompt rejects out-of-domain questions so the model stays in its lane (performance nutrition, supplementation, recovery, training science).

Repo layout

neuron/
├── backend/        FastAPI service — ingestion, RAG, citation verifier, eval
│   └── app/
│       ├── services/ingestion/   USDA, PubMed, MedlinePlus, CDC, WHO clients
│       ├── services/rag.py       citation-enforced retrieval pipeline
│       ├── services/verifier.py  grounding check (claim → source)
│       └── services/eval.py      benchmark harness on medical QA datasets
├── frontend/       Next.js web app — Ask UI, citation chips, source panel
├── .github/        CI/CD workflows
└── docker-compose.yml    local dev orchestration

Local development

Requires Docker, Node 20+, and Python 3.11+.

docker compose up -d postgres
cd backend && pip install -r requirements.txt && uvicorn app.main:app --reload
cd frontend && npm install && npm run dev

Open http://localhost:3000.

Environment

Copy .env.example to .env and fill in:

  • OPENAI_API_KEY — embedding + chat completion
  • PINECONE_API_KEY / PINECONE_INDEX — vector store
  • USDA_API_KEYFoodData Central key
  • NCBI_API_KEY — optional, raises PubMed rate limit
  • DATABASE_URL — Postgres connection string
  • SENTRY_DSN — error tracking (optional in dev)

Disclaimer

Neuron provides general performance, nutrition, and health information for educational purposes only. It is not a substitute for professional medical or sports-medicine advice. Always consult a qualified clinician for personal medical decisions.

License

MIT — see LICENSE.

About

Citation-grounded AI for athletes — performance nutrition, supplementation, recovery. RAG over USDA, NIH, CDC, WHO, and PubMed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors