> For the complete documentation index, see [llms.txt](https://relationlabs.gitbook.io/protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://relationlabs.gitbook.io/protocol/indexer/parse-data.md).

# To parse RDF data

The last chapter introduced how to acquire RDF data from the blockchain. This chapter will show how to parse these RDF data.

### Data filtering

[EIP6239](http://eips.ethereum.org/EIPS/eip-6239) covers a lot more ground than the Relation Protocol does. So, we will filter the events shown in the last chapter.

Graph Indexer will parse the RDF data conforming to [Schema specification](/protocol/schema-standard/schema-list.md).

This is to say that the address returned by the contract's `schemaURI()` method must exist in [Schema specification](/protocol/schema-standard/schema-list.md) for it to be parsed by the `Graph Indexer`.

In the [EIP6239 specification](http://eips.ethereum.org/EIPS/eip-6239), the process to acquire a Schema is defined:

```Solidity
interface ISemanticRDFSchema {
	/**
 	* @notice Get the URI of schema for this contract.
 	* @return The URI of the contract which points to a configuration profile.
 	*/
	function schemaURI() external view returns (string memory);
}
```

### Procedures for parsing

Acquire the prefix definition from [Schema](https://arweave.net/-2hCuTMqo1fz2iyzf7dbEbzoyceod5KFOyGGqNiEQWY):

```sparql
PREFIX : <http://relationlabs.ai/entity/>
PREFIX p: <http://relationlabs.ai/property/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
```

Put it together with the RDF data parsed from Event:

```sparql
:Soul_0x0109c8ee3151bde7b6b5d9f37e9d2c4bc16930fe p:following :Soul_0x6247123ec0fe0d25feb811e3c4d4a760c1f2e63e .
```

We now have a complete RDF:

```sparql
PREFIX : <http://relationlabs.ai/entity/>
PREFIX p: <http://relationlabs.ai/property/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

:Soul_0x0109c8ee3151bde7b6b5d9f37e9d2c4bc16930fe a :Soul;
p:name "Alice" .

:Soul_0x6247123ec0fe0d25feb811e3c4d4a760c1f2e63e a :Soul;
p:name "Bob" .

:Soul_0x0109c8ee3151bde7b6b5d9f37e9d2c4bc16930fe p:following :Soul_0x6247123ec0fe0d25feb811e3c4d4a760c1f2e63e .
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://relationlabs.gitbook.io/protocol/indexer/parse-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
