Resources
- LlamaIndex Documentation
- FalkorDB Graph Store Documentation
- Blog: LlamaIndex RAG Implementation
- LlamaIndex GitHub Repository
Installation
Install LlamaIndex with FalkorDB support:Quick Start
1. Initialize FalkorDB Graph Store
2. Build Knowledge Graph from Documents
3. Query the Knowledge Graph
Advanced Usage
Custom Cypher Queries
Graph RAG with Embedding-Based Retrieval
Building Knowledge Graph from Structured Data
Multi-Modal Knowledge Graphs
Incremental Updates
Graph Visualization and Export
Custom Schema Definition
Use Cases
- Document Q&A: Extract entities and relationships from unstructured documents
- Enterprise Knowledge Management: Build searchable knowledge graphs from company data
- Research and Discovery: Link concepts across large document collections
- Recommendation Systems: Leverage graph relationships for personalized recommendations
- Data Integration: Unify data from multiple sources into a coherent knowledge graph
Best Practices
- Chunk Size: Adjust chunk size based on document structure (default: 512 tokens)
- Triplet Extraction: Tune
max_triplets_per_chunkbased on content density - Embedding Strategy: Use hybrid mode for better retrieval (combines text and structure)
- Schema Design: Define clear entity and relationship types for consistent graphs
- Incremental Updates: Use
insert()for adding new data without full re-indexing - Query Optimization: Use
similarity_top_kto control retrieval scope
Performance Tips
- Batch Processing: Process documents in batches for large datasets
- Parallel Indexing: Enable parallel processing for faster indexing
- Caching: Cache embeddings to avoid recomputation
- Index Persistence: Save and load indexes to avoid rebuilding
Frequently Asked Questions
What is LlamaIndex and how does it integrate with FalkorDB?
What is LlamaIndex and how does it integrate with FalkorDB?
LlamaIndex is an open-source framework for building LLM-powered applications. It integrates with FalkorDB via the
llama-index-graph-stores-falkordb package, enabling you to build, query, and manage knowledge graphs as part of your RAG pipeline.How do I install LlamaIndex with FalkorDB support?
How do I install LlamaIndex with FalkorDB support?
Install with pip:
pip install llama-index llama-index-graph-stores-falkordb. Then initialize the graph store with FalkorDBGraphStore(hostname='localhost', port=6379, database='my_graph').Can I build a knowledge graph from unstructured documents?
Can I build a knowledge graph from unstructured documents?
Yes. Use
KnowledgeGraphIndex.from_documents(documents, storage_context=storage_context) to automatically extract entities and relationships from text documents, PDFs, and other formats into a FalkorDB knowledge graph.What is hybrid retrieval mode?
What is hybrid retrieval mode?
Hybrid mode combines text-based search with graph structure-based retrieval for better results. Enable it with
embedding_mode='hybrid' in the query engine to leverage both vector similarity and graph relationships when answering questions.Can I add new data without rebuilding the entire graph?
Can I add new data without rebuilding the entire graph?
Yes. Use the
index.insert(document) method to incrementally add new documents to an existing knowledge graph index without re-indexing everything. This is ideal for evolving datasets.