Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
santteegt committed Nov 29, 2024
1 parent f92b0c4 commit 77d9b15
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
7 changes: 2 additions & 5 deletions docs/pages/apis/agora-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ This pipeline generates a knowledge base from RetroPGF projects and proposals wi
To access this API, you'll need an API key. You can request one through the [Agora's Discord server](https://www.agora.xyz/#Product). You can run the `rag-api-pipeline setup` command to set the REST API Key,
or your can directly store the key in the `config/secrets/api-key` file. A less secure option is to provide it using the `--api-key` CLI argument.

## Getting the Agora API OpenAPI Spec

TODO:

## Defining the RAG API Pipeline Manifest

This pipeline will extract data related to DAO proposals (`/proposals`) and RetroPGF projects (`/projects`).
Expand Down Expand Up @@ -128,4 +124,5 @@ After execution, you'll find the processed data and compressed knowledge base sn

1. Locate the generated snapshot in `output/optimism_agora_api/` (named `optimism_agora_api_collection-xxxxxxxxxxxxxxxx-yyyy-mm-dd-hh-mm-ss.snapshot.tar.gz`) or download it from the HuggingFace link above.
2. Follow the official [knowledge base selection guide](https://docs.gaianet.ai/node-guide/customize#select-a-knowledge-base)
3. Configure your node using the recommended settings from the [node deployment guide](/cli/node-deployment#recommended-gaianet-node-configuration)
3. Configure your node using the recommended settings from the [node deployment guide](/cli/node-deployment#recommended-gaia-node-configuration).
Do not forget to update the custom prompts to mention `optimism` as the target DAO protocol.
12 changes: 2 additions & 10 deletions docs/pages/apis/boardroom-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ This pipeline generates a knowledge base from any DAO/Protocol hosted by the Boa
To use this API, you'll need an API key. Request one from [Boardroom's developer portal](https://boardroom.io/developers/billing). You can run the `rag-api-pipeline setup` command to set the REST API Key,
or your can directly store the key in the `config/secrets/api-key` file. A less secure option is to provide it using the `--api-key` CLI argument.

## Getting the Boardroom API OpenAPI Spec

TODO:

## Defining the RAG API Pipeline Manifest

This pipeline will extract data related to protocol metadata (`/protocols/aave`), DAO proposals (`/protocols/aave/proposals`) and discussion posts from the Discourse forum site (`discourseTopics`, `discourseCategories` and `discourseTopicPosts`) if there's any.
Expand Down Expand Up @@ -263,12 +259,8 @@ The processed data and knowledge base snapshot for Aave will be available in the

1. Locate the generated snapshot in `output/aave_boardroom_api/` (named `aave_boardroom_api_collection-xxxxxxxxxxxxxxxx-yyyy-mm-dd-hh-mm-ss.snapshot.tar.gz`) or download it from the HuggingFace link above.
2. Follow the official [knowledge base selection guide](https://docs.gaianet.ai/node-guide/customize#select-a-knowledge-base)
3. Configure your node using the recommended settings from the [node deployment guide](/cli/node-deployment#recommended-gaianet-node-configuration)

Once the command above finishes, you'll find a compressed knowledge base snapshot in
`{OUTPUT_FOLDER}/aave_boardroom_api/` with name aave_boardroom_api_collection-xxxxxxxxxxxxxxxx-yyyy-mm-dd-hh-mm-ss.snapshot.tar.gz`. Now it's time to import it
into your gaia node. You can find the instructions on how to select a knowledge base [here](https://docs.gaianet.ai/node-guide/customize#select-a-knowledge-base).
The recommended prompts and node config settings can be found [here](/cli/node-deployment#recommended-gaianet-node-configuration).
3. Configure your node using the recommended settings from the [node deployment guide](/cli/node-deployment#recommended-gaia-node-configuration).
Do not forget to update the custom prompts to mention `aave` as the target DAO protocol.

### Example user prompts

Expand Down
8 changes: 4 additions & 4 deletions docs/pages/cli/node-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ gaianet start
The example JSON config file from below helps you to quickly setup/deploy a Gaia node and import a knowledge base snapshot:

- Tested on Mac Studio 32GB RAM
- Custom prompts for the [Boardroom Aave example](/apis/boardroom-api)
- Custom prompts for the Boardroom's `MolochDAO` example
- `snapshot` should point to either a local tar file or to a HTTP server where the node can download a Qdrant snapshot

```json [config.json]
Expand All @@ -56,12 +56,12 @@ The example JSON config file from below helps you to quickly setup/deploy a Gaia
"embedding_name": "Nomic-embed-text-v1.5",
"llamaedge_port": "8080",
"prompt_template": "llama-3-chat",
"qdrant_limit": "1",
"qdrant_limit": "10",
"qdrant_score_threshold": "0.5",
"rag_policy": "system-message",
"rag_prompt": "Use the following pieces of context to answer the user's question. Respond directly to the user with your answer, do not say 'this is the answer' or 'this is the answer' or similar language. Never mention your knowledge base or say 'according to the context' or 'hypothetical' or other similar language. Use json metadata included in knowledge base whenever possible enrich your answers. The term aave refers the DAO protocol where discussions and proposals are posted. If you don't know the answer, don't try to make up an answer. \n----------------\n",
"rag_prompt": "Use the following pieces of context to answer the user's question. Respond directly to the user with your answer, do not say 'this is the answer' or 'this is the answer' or similar language. Never mention your knowledge base or say 'according to the context' or 'hypothetical' or other similar language. Use json metadata included in knowledge base whenever possible enrich your answers. The terms `molochdao` and `moloch dao` refer to the DAO protocol where discussions and proposals are posted. If you don't know the answer, don't try to make up an answer. \n----------------\n",
"reverse_prompt": "",
"snapshot": "/your-snapshot-path-or-url", # snapshot tar file
"system_prompt": "You are an AI assistant designed to provide clear, concise, and accurate answers to user queries. Your primary functions include retrieving relevant information from the provided RAG (Retrieval-Augmented Generation) data and utilizing your pre-training data when necessary. Use json metadata included in RAG data whenever possible enrich your answers. The term aave refers the DAO protocol where discussions and proposals are posted. If no relevant information is found, you will inform the user that you are not familiar with the knowledge."
"system_prompt": "You are an AI assistant designed to provide clear, concise, and accurate answers to user queries. Your primary functions include retrieving relevant information from the provided RAG (Retrieval-Augmented Generation) data and utilizing your pre-training data when necessary. Use json metadata included in RAG data whenever possible enrich your answers. The term `molochdao` and `moloch dao` refers to the DAO protocol where discussions and proposals are posted. If no relevant information is found, you will inform the user that you are not familiar with the knowledge."
}
```

0 comments on commit 77d9b15

Please sign in to comment.