Food Science Knowledge Base + R&D Copilot
Mx3RnD/food-science-kb
GraphRAG privado para pesquisa e desenvolvimento em ciência de alimentos
Ver no GitHubBase de conhecimento em ciência de alimentos com GraphRAG (LightRAG + Docling) que extrai equações em LaTeX, tabelas e figuras de livros técnicos. Funciona como skill Claude para assistência em P&D alimentar, com busca grounded em um grafo de conhecimento privado que conecta domínios como sensória, tecnologia de processo, segurança alimentar e química de alimentos.
Instalação
npx convez-ai Mx3RnD/food-science-kb1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Assistência em métodos de análise sensória e testes de aceitação
- Consulta de parâmetros de processo e seleção de SOPs
- Formulação de produtos e resolução de problemas de shelf-life
- Pesquisa em segurança alimentar e análise química
Veredito

Ferramenta robusta e bem arquitetada para equipes de P&D alimentar que precisam de busca grounded em literatura técnica com controle total sobre dados privados. A implementação com GraphRAG, Docling e integração nativa com Claude é sofisticada, mas requer domínio técnico considerável e PDFs próprios para construir o grafo.
README
A tradução para o português deste README ainda está na fila.
Food Science Knowledge Base + R&D Copilot
A food-science knowledge base and Claude skill, backed by GraphRAG (LightRAG). Textbooks are parsed with Docling (real tables, equations as LaTeX, figures extracted and vision-described), their entities and relations are extracted into one knowledge graph, and their passages are embedded — so a food scientist gets grounded, citable answers across every domain:
sensory · process-tech · food-safety · food-chemistry ·
product-development · food-analysis · sops
All domains share one graph so concepts connect across them. Citation, author, and place names are deliberately kept out so the graph is food-science structure, not bibliography noise.
What this repo includes (and does not)
This repo is the tool: the pipeline, the skill, the playbook, and the recipe. It does not include the knowledge graph itself or any book text — that store is built from copyrighted textbooks and stays private/local (git-ignored). Bring your own PDFs and build your own graph.
Setup
uv sync # create the env and install deps
set-openai-key # one-time, stores your OpenAI key locally
Tip: on an OpenAI Tier-1 account, keep LLM_MAX_ASYNC=8 (the default) so
indexing paces within the 200K tokens/min limit instead of thrashing.
Build the graph from a folder of PDFs
# put PDFs anywhere under ~/Documents/FOOD SCIENCE RAW (subfolders ok)
uv run python batch_ingest.py --src "." # parse -> describe figures -> index
Resumable and idempotent: parsing and embeddings are cached, so a rerun never
redoes finished work. See recipes/extraction-pipeline.md for the method and the
hard-won lessons (memory limits, formula-enrichment cost, rate-limit tuning).
Ask a question
uv run python query.py "How do you run a triangle test?" --mode mix
Returns grounded context (graph relations + passages with [page N] markers,
source tags, and figure descriptions). Add --answer to let the KB compose the
answer; otherwise the calling agent answers and cites.
Use it as a Claude skill
SKILL.md defines the food-science skill — a day-to-day R&D copilot (method/SOP
selection, process parameters, formulation, shelf-life, troubleshooting). It
loads docs/food-scientist-playbook.md for domain reasoning and graph-traversal
methods.
- Local (Claude Code): the skill calls
query.pyagainst the local store. - Cloud (claude.ai): planned via an MCP connector that hosts the graph query behind an endpoint, so the same skill works in the web app with the graph kept private. (See task: portable packaging.)
Pieces
| File | Role |
|---|---|
extract.py | Docling -> page-tagged markdown: tables, LaTeX equations, figure PNGs |
parse_worker.py | parse one PDF as a subprocess (--no-formula to rescue equation-bombs) |
batch_ingest.py | orchestrator: parallel parse -> figure vision -> index (resumable) |
kb.py | builds the LightRAG store; food-science entity focus; concurrency + overlap |
query.py | retrieve grounded context (or a full answer with --answer) |
status_report.py | writes a progress report into the Obsidian vault |
SKILL.md | the food-science Claude skill |
docs/food-scientist-playbook.md | how to think like a food scientist + drive the graph |
recipes/extraction-pipeline.md | the reproducible ingestion method + lessons |
docs/RECOVERY.md | how to recover/resume the pipeline |
kb/, parsed/, figures/ | derived stores — local only, git-ignored |
Models: gpt-4o-mini for extraction and figure vision, text-embedding-3-small
for embeddings.
License
MIT — see LICENSE.