From 77d9b153bdfaeb71378791c094ff763a390b24f1 Mon Sep 17 00:00:00 2001 From: Santiago Gonzalez Date: Fri, 29 Nov 2024 16:04:29 -0500 Subject: [PATCH] update docs --- docs/pages/apis/agora-api.mdx | 7 ++----- docs/pages/apis/boardroom-api.mdx | 12 ++---------- docs/pages/cli/node-deployment.mdx | 8 ++++---- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/docs/pages/apis/agora-api.mdx b/docs/pages/apis/agora-api.mdx index a4a1f0f..4e0fb65 100644 --- a/docs/pages/apis/agora-api.mdx +++ b/docs/pages/apis/agora-api.mdx @@ -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`). @@ -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. diff --git a/docs/pages/apis/boardroom-api.mdx b/docs/pages/apis/boardroom-api.mdx index 7a72c81..47eab9a 100644 --- a/docs/pages/apis/boardroom-api.mdx +++ b/docs/pages/apis/boardroom-api.mdx @@ -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. @@ -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 diff --git a/docs/pages/cli/node-deployment.mdx b/docs/pages/cli/node-deployment.mdx index 071ed1a..93856d4 100644 --- a/docs/pages/cli/node-deployment.mdx +++ b/docs/pages/cli/node-deployment.mdx @@ -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] @@ -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." } ```