RAG Pipeline

DeepBlock integrates a Retrieval-Augmented Generation (RAG) pipeline to empower AI-driven use cases. RAG is a technique where an AI (typically a large language model) is augmented with a live retrieval step; it can fetch relevant data from a knowledge source to ground its responses in facts.

Natural Language Querying

Suppose you or an AI agent asks a question in plain English (or any supported language), for example, “Which addresses withdrew a large amount of ETH from Uniswap in the last 24 hours?”. Normally, a language model might try to answer from memory and could hallucinate or be outdated. With DeepBlock’s RAG pipeline, the system will convert or interpret that question into a search/query against the knowledge graph.

Retrieval Step

Using a combination of techniques (perhaps a semantic search or a template mapping to GraphQL), DeepBlock will retrieve the most relevant data needed to answer the question. In this example, it might run a GraphQL query to get the list of addresses and amounts withdrawn from Uniswap’s contracts in the last day. It could also fetch additional context like the current ETH price or related stats if needed to formulate an answer.

Augmenting the LLM

The retrieved data is then fed into the LLM as part of its context. Instead of a blank-slate model, the LLM now has a “cheat sheet” of factual data from DeepBlock that it can reference. This greatly increases the accuracy of the answer. The model doesn’t have to guess the numbers or recall possibly outdated info; it can see the data directly.

Generation Step

The LLM, armed with context, generates a response. Continuing our example, it might respond:

In the past 24 hours, three addresses withdrew significant ETH from Uniswap. Address X withdrew 500 ETH, Address Y withdrew 300 ETH, and Address Z withdrew 250 ETH

plus any additional analysis (like noting if these addresses are related or if the withdrawals were unusual compared to norms).

Continuous Learning

Over time, as more queries are asked and answered, the system can learn which data is most relevant for certain questions. This can improve the retrieval step (caching common query results or tuning the search.)

The pipeline can also be interactive (e.g., an AI agent might ask follow-up questions based on the initial answer, and DeepBlock will perform new retrievals for each, enabling a back-and-forth investigative analysis.)

The RAG pipeline ensures that AI outputs remain grounded in reality, especially critical for financial and blockchain domains where accuracy is paramount.

Users benefit by getting conversational answers to complex data questions, and developers benefit by being able to offer AI-driven features (like chatbots or automated reports) that are always backed by the latest on-chain data. Essentially, DeepBlock becomes the real-time factual memory for the AI.

Last updated