> For the complete documentation index, see [llms.txt](https://graphai-1.gitbook.io/graphai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://graphai-1.gitbook.io/graphai/how-graphai-works/graphrag-lifecycle-in-graphai.md).

# GraphRAG Lifecycle in GraphAI

The GraphRAG component of GraphAI follows a continuous lifecycle to maintain an up-to-date and comprehensive knowledge graph:

1. **Data Ingestion**: Continuously indexing new blockchain data.
2. **Relationship Mapping**: Identifying and establishing connections between data points.
3. **Context Building**: Aggregating related information to provide a fuller picture of each entity or transaction.
4. **Query Optimization**: Utilizing the graph structure to enhance the speed and accuracy of complex queries.
5. **AI Model Integration**: Providing contextual information to AI models for improved understanding and decision-making.
6. **Feedback Loop**: Continuously refining the graph based on new data and AI model interactions.

This iterative process ensures that the knowledge graph remains a dynamic and valuable resource for AI-driven blockchain applications.

<figure><img src="/files/9WO04KSGBc9EvzTqDDC3" alt=""><figcaption></figcaption></figure>
