Replace traditional vector search RAG with Markdown and knowledge graphs
By writing complex application modules, business logic, and database relationships into structured Markdown files, combined with knowledge graphs and a custom MCP server, Claude CLI replaces traditional vector search RAG, achieving efficient comprehension of complex ERP applications and significantly reducing hallucinations.
Reddit r/ClaudeCode/u/Shivam__kumar
Claude CLIMCP serverMarkdown
Added 2026-11-07 · originally published 2026-11-06
Steps
- 1Write structured Markdown files for each application module, business logic, workflow, inter-module relationship, condition, and exception.
- 2Create dedicated database documentation recording the business meaning, rationale, column usage, and business relationships between tables for each table.
- 3Ensure the Markdown files are well-organized, purpose-driven, and include correct references and links to related documents.
- 4Have Claude read these documentation files and generate diagrams showing how the content connects.
- 5Build a custom MCP server capable of executing read-only database queries to provide Claude with dynamic access to database records.
- 6Connect everything via Claude CLI and write custom rules and instructions to standardize how Claude handles user queries, understands business logic, queries databases, formats answers, and generates visualizations.
Copy-ready prompt
Please read the following Markdown documentation for [application system/business module] (including business logic, module relationships, and database table descriptions), understand their interconnections, and generate a knowledge graph based on the documents. When a user asks a question [e.g., a complex cross-module business rule question], answer it by combining the document structure and the read-only database query tool, and format the answer as required.
#AI Agent#RAG Optimization#Claude CLI#Knowledge Graph
Related use cases
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.