> For the complete documentation index, see [llms.txt](https://openledger.gitbook.io/openledger/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openledger.gitbook.io/openledger/datanets-and-proof-of-attribution/rag-attribution.md).

# RAG Attribution

## Understanding Retrieval-Augmented Generation (RAG) Attribution

Retrieval-Augmented Generation (RAG) combines generative AI with retrieval-based data sources, ensuring that model outputs are both accurate and traceable. In OpenLedger, RAG Attribution ensures that:

* **Data Provenance is Maintained:** Every piece of retrieved information used in generating an output is verifiably linked to its source.
* **Contributors are Rewarded:** Data providers receive attribution-based incentives based on how frequently their data is retrieved and utilized.
* **Transparency is Ensured:** Users can trace model outputs back to the datasets that influenced them, reducing misinformation risks.

### RAG Attribution Pipeline

**Step 1: Query Processing & Data Retrieval**

* A user submits a query to an AI model.
* The model retrieves relevant data from indexed sources in the OpenLedger data reservoir.

**Step 2: Attributed Data Usage**

* Retrieved information is incorporated into the model’s response.
* All utilized data points are cryptographically logged for attribution tracking.

**Step 3: Contributor Attribution & Rewards**

* Data contributors receive micro-rewards each time their data is retrieved and used.
* Attribution-based incentives scale with data relevance and query frequency.

**Step 4: Transparent Citations in Model Outputs**

* Model responses include citations or metadata pointing to the original data sources.
* Users can verify where generated insights originate from, ensuring accountability and trust.
