Replace traditional RAG with Markdown and knowledge graphs
For complex ERP applications, ditch traditional vector-search RAG in favor of a structured Markdown knowledge base and use Claude to generate a knowledge graph. Combined with a custom read-only database MCP server and the Claude CLI, this approach significantly improves accuracy when answering questions about complex business logic.
Reddit r/AI_Agents/u/Shivam__kumar
Claude CLIClaudeMCP server
Added 2026-11-07 · originally published 2026-11-06
Steps
- 1Write structured Markdown files for each module, business logic flow, condition, and exception in your application.
- 2Create dedicated database documentation detailing the business meaning, purpose, column usage, and inter-table business relationships for each table.
- 3Have Claude read these Markdown files and generate a graph showing how everything connects.
- 4Build a custom MCP server capable of executing read-only database queries to provide dynamic data access.
- 5Connect the knowledge base and MCP tools via the Claude CLI, and write custom rules and instructions to handle user questions, generate charts, and query the database.
Copy-ready prompt
Please read the structured Markdown documentation regarding [application module and database], and understand the business rules, table relationships, and workflows between them. When a user asks [enter user question], analyze the request, independently decide what knowledge to query or which read-only database tools to use, and provide an accurate answer or generate a visualization chart.
#AI Agent#RAG Optimization#Knowledge Graph#Claude
Related use cases
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.