From f358f6d7e5870d2d8b975e0a35d49c60f75cc289 Mon Sep 17 00:00:00 2001 From: Fraser Date: Wed, 9 Aug 2023 00:49:32 -0400 Subject: [PATCH 1/2] also fall back to duckduckgo on in-text citations accidentally missed this one the first time around --- web/src/pages/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/pages/index.tsx b/web/src/pages/index.tsx index 9a18f48..0e23570 100644 --- a/web/src/pages/index.tsx +++ b/web/src/pages/index.tsx @@ -88,9 +88,12 @@ const ShowCitation: React.FC<{citation: Citation, i: number}> = ({citation, i}) }; const ShowInTextCitation: React.FC<{citation: Citation, i: number}> = ({citation, i}) => { + const url = citation.url && citation.url !== "" + ? citation.url + : `https://duckduckgo.com/?q=${encodeURIComponent(citation.title)}`; return ( + href={url}> [{i + 1}] ); From 1aa6149acedb4c8c7afb76ed38b75d069bc5cdd6 Mon Sep 17 00:00:00 2001 From: ccstan99 Date: Thu, 10 Aug 2023 12:51:44 -0700 Subject: [PATCH 2/2] clean up readme --- readme.md | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/readme.md b/readme.md index 64c65e1..714ce74 100644 --- a/readme.md +++ b/readme.md @@ -1,27 +1,15 @@ # [https://chat.stampy.ai](https://chat.stampy.ai) # stampy-chat -The Stampy conversational chatbot answers questions about AI Safety & Alignment based on information retrieved from the [Alignment Research Dataset (ARD)](https://github.com/moirage/alignment-research-dataset). The project has 3 components: +The Stampy conversational chatbot answers questions about AI Safety & Alignment based on information retrieved from the [Alignment Research Dataset (ARD)](https://github.com/moirage/alignment-research-dataset). The project has 2 components: -1. `src/` **Data** - ARD is ingested by splitting text into chunks then embedded and uploaded into a vector store along with relevant metadata about the chunk of text. -2. `api/` **Backend API** - Given a user's query and chat history, the most semantically similar chunks are retrieved from the vector store then a large language model is prompted to answer the query based on the retrieved context. The generated answer is returned along with cited sources. -3. `web/` **Frontend GUI** - Web app that calls the backend API and displaying the conversation flow. +1. `api/` **Backend API** - Given a user's query and chat history, the most semantically similar chunks are retrieved from the vector store then a large language model is prompted to answer the query based on the retrieved context. The generated answer is returned along with cited sources. + +2. `web/` **Frontend GUI** - Web app that calls the backend API and displaying the conversation flow. ## What is the purpose of Stampy? -With the recent development in AI, growing concern and interest in AI Safety & Alignment is coupled with tons of information and misinformation. Sifting through all the text while trying to identify quality sources is a daunting barrier for entry. Stampy not only strives to provide quality information but also allows people to contribute while learning. The FAQs are hand curated and limited by volunteer bandwidth. A chatbot can leverage LLMs to synthesize & summarize the ever expanding literature. - -## Who are the users? - -In general, the Stampy project serves users at 3 levels of understanding: - -- **New** - People completely new to AI Safety & Alignment. Many volunteers have technical backgrounds but not necessarily much experience with ML per se. The website & chatbot should be accessible by the general public, so jargon should be minimized where possible. - -- **Moderate** - However, there should also be enough “meaty” content for people who are ready to delve deeper. Beyond raising general awareness about the field, another objective for the project is to engage & build a community for those hoping to upskill or transition into the field. People can contribute by answering questions, developing software, or offering skills they have. - -- **Knowledgeable** experts who might want to share their research by answering questions. - -Given the disparate backgrounds of users, for both the website and chatbot, we should consider having users identify their starting level (new, moderate, knowledgeable). On the website, the list of starter and recommended questions would be tuned to the user’s level. Similarly, the chatbot's usage of technical terminology could be adjusted to their level. +With the recent development in AI, growing concern and interest in AI Safety & Alignment is coupled with tons of information and misinformation. Sifting through all the text while trying to identify quality sources is a daunting barrier for entry. Stampy not only strives to provide quality information but also allows people to contribute while learning. The FAQs are hand curated and limited by volunteer bandwidth. This chatbot leverages LLM to synthesize & summarize the ever expanding literature. ## Usage @@ -55,15 +43,6 @@ npm run dev In the second window, a URL will be printed. Probably `http://localhost:3000`. Paste this into your browser to see the app. -### Accessing Dataset - -If you'll be loading data alignment research dataset to be embedded and stored in pinecone, -you'll need to access to our [private version of the dataset](https://huggingface.co/datasets/StampyAI/ard-private). -1. Create a free [HuggingFace account](https://huggingface.co/join). -2. Give admin your account name to be added to the organization. DM ccstan on Discord. -3. Create an [access token](https://huggingface.co/settings/tokens). -4. Follow [login instructions](https://huggingface.co/docs/huggingface_hub/quick-start) to access private datasets. - ## Original Prototypes The prototypes below were developed in response to a [bounty on LessWrong](https://www.lesswrong.com/posts/SLRLuiuDykfTdmesK/speed-running-everyone-through-the-bad-alignement-bingo).