> For the complete documentation index, see [llms.txt](https://ayshptk.gitbook.io/pied-piper-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayshptk.gitbook.io/pied-piper-docs/trustql.md).

# TrustQL?

TrustQL is an on-chain reputation calculation framework built from the ground-up with flexibility in mind. It comes with it's own GraphQL-like interface API where anyone can pass in an address and the interface they want to use for calculating the score. We fetch all the data we can about the user and pass it through our grading algorithm to provide you with an "XP Level" of all the metrics combined.

Overview:

![Sample Query](/files/FNbPVPxtHFWp6ojkrh5T)

* Even though we have a custom grading system, the main metric (weightage) of each parameter is completelty in control of the user. We use our algorithm only to provide "levels" (like experience level in games) for each parameter based on the user's activity. This is to easily support comparing apples to oranges without having the user think much about it.
* The whole data fetching is built in a way that it does the least possible calls and fetches the max possible data. However, we agree there is work left in optimising for addresses which have millions of transactions. Our suggested solution is a chain indexer.
* The code in the repository explains a few interesting ways one can query data. We have tried to demonstrate it as a "protocol"-like interface where it is incredibly easy to add to / remove / tweak parameters and include it in the query language
* From the user end, this is as easy as it could be - a single API route, with < 10 lines of query, and they will be returned by a plain text result with the overall score of trhe particular address.
* It is of course open source and the team would still continute to build upon the app after the hackathon.


---

# 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://ayshptk.gitbook.io/pied-piper-docs/trustql.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.
