# AI Nutrition Assistant: A Personalized Nutrition Consultation System Based on Knowledge Graph and Generative AI

> This project builds an intelligent nutrition consultation system combining knowledge graph and generative AI, which constructs a structured graph by automatically extracting knowledge from medical texts to provide safe and verifiable nutrition advice for chronic diseases.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-05-25T02:43:04.000Z
- 最近活动: 2026-05-25T02:53:53.104Z
- 热度: 154.8
- 关键词: 知识图谱, 生成式AI, 营养咨询, 慢性病管理, GraphRAG, 医疗AI, Neo4j, Llama, 信息抽取, 越南语NLP
- 页面链接: https://www.zingnex.cn/en/forum/thread/ai-ai-c7e867a5
- Canonical: https://www.zingnex.cn/forum/thread/ai-ai-c7e867a5
- Markdown 来源: floors_fallback

---

## AI Nutrition Assistant Project Overview

This project is a personalized nutrition consultation system combining knowledge graph and generative AI. It addresses the dietary management needs of chronic disease patients and provides safe, verifiable nutrition advice via the GraphRAG architecture. Core technologies include knowledge graph construction (EDC framework), multi-modal input (text + image recognition), and zero-hallucination design. Developed by Vietnamese student Lê Quang Huy, it was released on GitHub in May 2026.

## Project Background and Core Issues

This project was developed by Vietnamese student Lê Quang Huy (student ID: 223571) as a course design for the second semester of the 2025-2026 academic year. Core research question: How to automatically extract knowledge from unstructured medical texts to build a structured graph, and combine GraphRAG to provide safe and verifiable nutrition advice for chronic disease patients?

## Technical Architecture and Knowledge Graph Construction

**Technology Stack**: Frontend React18 + Vite, Backend FastAPI + Python3.11, Database Neo4j5.16, Gateway Nginx1.29, LLM Service Groq API (Llama3.3 70B/4 Scout17B), Embedding Model Jina AI Embeddings v3.
**Knowledge Graph Construction (EDC Framework)**: 
1. Preprocessing: LLM standardizes format → cleaning and sentence splitting → chunking → coreference resolution;
2. EDC three stages: Extract (open information extraction) → Define (relationship semantic definition) → Canonicalize (schema normalization);
3. Cleaning and deduplication: rule-based filtering + semantic deduplication;
The final graph contains 4 types of nodes (Food/Disease/Nutrient/Other), 12 relationship types, about 800 nodes, and over 1200 triples.

## GraphRAG Query Flow and Core Functions

**Query Flow**: User input (text/image) → image recognition (if any) → Neo4j precise search → semantic mapping (dialect to standard name) → circuit breaker mechanism (intercept if no data) → LLM generates advice → output verified advice + micronutrient chart.
**Core Functions**: 
- Nutrition query: Input food to get 16 micronutrient indicators + advice;
- Image recognition: Llama4 Scout recognizes food (86% accuracy);
- GraphRAG: Based on real data, no fabrication;
- Circuit breaker mechanism: Intercept non-existent foods to avoid hallucinations;
- Vietnamese support: Understand slang and dialects.

## Supported Diseases and Deployment Access

**Supported Diseases**: Diabetes (blood sugar management), Hypertension (sodium restriction), Kidney disease (protein control), Obesity (calorie control).
**Deployment Links**: 
- Web application: http://ainutritionassistant.noirhuy.id.vn (no login required);
- Neo4j browser: http://ainutritionassistant.noirhuy.id.vn:7474 (username: neo4j, password: password);
- Backup IP: http://103.82.27.129.
**Quick Usage**: Visit the web → select disease → input food → click analyze; Run `MATCH (n) RETURN n LIMIT100` in Neo4j browser to view the graph.

## Innovation Points and Project Significance

**Innovation Points**: 
1. Zero-hallucination design: Circuit breaker mechanism intercepts foods with no data to avoid false advice;
2. Dialect understanding: Semantic mapping layer handles Vietnamese slang (e.g., "trái thơm" → "dứa");
3. Verifiable sources: Advice can be traced back to original medical literature;
4. Multi-modal input: Supports text + image recognition.
**Project Significance**: Helps chronic disease patients make informed food choices and avoid dietary mistakes; Provides a GraphRAG architecture reference for medical AI; The pipeline design can be extended to more diseases, data, and languages.

## Limitations and Improvement Directions

**Current Limitations**: Knowledge coverage (800 nodes need expansion), disease scope (only 4 types), regional limitation (based on Vietnamese literature).
**Future Improvements**: Expand the knowledge graph to more authoritative databases; Add multi-language support; Combine user health data to enhance personalization; Develop native mobile applications.
