Skip to main content
LlamaIndex is an open-source framework designed to simplify the development of LLM-powered applications. It provides tools for ingesting, indexing, and querying diverse data sources. In a typical RAG (Retrieval-Augmented Generation) setup, LlamaIndex orchestrates both the retrieval and generation phases. FalkorDB powers the retrieval module using Cypher queries, while any LLM trained on Cypher can handle the generation step—making it a natural fit for graph-native workflows.

Resources

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

  1. Chunk Size: Adjust chunk size based on document structure (default: 512 tokens)
  2. Triplet Extraction: Tune max_triplets_per_chunk based on content density
  3. Embedding Strategy: Use hybrid mode for better retrieval (combines text and structure)
  4. Schema Design: Define clear entity and relationship types for consistent graphs
  5. Incremental Updates: Use insert() for adding new data without full re-indexing
  6. Query Optimization: Use similarity_top_k to 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

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.
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').
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.
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.
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.