Introducing AlignmentSearch: An AI Alignment-Informed Conversional Agent
Authors: Henri Lemoine, Thomas Lemoine, and Fraser Lee
We are excited to introduce AlignmentSearch, an attempt to create a conversational agent that can answer questions about AI alignment. We built this site in response to ArthurB’s $5k bounty for a LessWrong conversational agent calling for the creation of a chatbot capable of discussing bad AI Alignment takes, and guiding people new to the field through common misunderstandings and early points of confusion.
AlignmentSearch uses a dataset about AI alignment to construct a prompt for ChatGPT to answer AI alignment-related questions, while citing established sources. We qualitatively observe a massive boost in the quality of answers over ChatGPT without any specialized prompt, with results either on par or better than those given by much stronger LLMs (GPT-4 and Bing Search).
AlignmentSearch indexes the Alignment Research Dataset, generating vector embeddings to enable nearest-semantic-neighbor search. We take a user query to find the top- most semantically close “paragraphs” (text blocks of around 220 tokens, plus some padding). The size of the dataset means we generally have access to a few paragraphs that are very semantically similar to the user’s question, and are likely to contain information that is useful in producing an answer. We form a prompt that gives these paragraphs to ChatGPT along with the user’s question and instructions on citation, and retrieve an answer somewhere between summary and synthesis, all with accurate inline citations linking to the source material. We’ve created a website that lets the user interact easily with this process: ask questions, dive into the sources used in an answer, and ask for further clarifications. We also have an alternative mode that exposes the raw results of the semantic search.
Alignment Research Dataset
The alignment research dataset was announced on LessWrong in June 2022, with a related paper accessible here. It contains posts and papers from a wide range of websites and books about alignment, including LessWrong, stampy.ai, arXiv, the alignment newsletter, etc. As it was created in June ’22, recent posts are absent. We are in the process of updating the dataset to contain recent AI alignment content.
Variable Source Quality
Not all sources are made equal. Posts on LessWrong with negative karma were removed, as to reduce the chances of the website parroting back foolishness. Moreover, stampy.ai contains a highly curated dataset of common question-answer pairs related to AI safety, and we plan on favoring this source in semantic searches. A more nuanced and optimization-driven prioritization system, a better curated dataset, and a better formatted prompt may further improve the quality of the answers.
We currently use OpenAI’s text-embedding-ada-002 embedding model. The motivation behind this decision comes from the recent price drop in OpenAI ada, now roughly 500x less expensive than its predecessor. Embedding the entire 1.2 GB dataset cost ~$50.
One might think embedding the entirety of LessWrong — instead of just the portions on AI Alignment — is wasteful given the scope of our project. However, throughout the development of AlignmentSearch, we’ve found that the ability to search other things — like entering the description of a cognitive bias to find out its name — would often be useful. While it might seem that this surplus of information is unrelated to questions focused on alignment, it occasionally turned out useful to pull a perfect passage from a non-AI source.
All blocks we have split the alignment dataset into include information about the author and title, in addition to the text itself. This enables users to ask “What is Paul Christiano’s view on Interpretability Research”, which will find paragraphs written by him referring to interpretability research, even though his name itself had not been mentioned within the paragraph.
When building a prompt that is not the first one in a conversation, we feed information about previous messages to ChatGPT during the next completion, such that it has some context on what has been discussed. Fairly constrained by a need to commit much of the input-buffer size to source material, a full chatbot experience would never be possible in our model. Specifically, we store the last 4 queries the user sent, and the response to the previous question by ChatGPT. This provides enough context for the conversational flow to still feel natural while keeping the prompt constrained.
Further refinements could include implementing some form of asynchronous summary, where previous conversational output is continually condensed. This would vaguely approximate long-term memory, but would be expensive and lose most information. Another method, to embed previous exchanges and compare by semantic similarity with the query, would similarly yield an appearance of long-term memory, have an increased information bandwidth and overall cheaper costs.
We would like to address several safety considerations related to our website.
First, several open-source tools have emerged to facilitate the automation of conversational AI systems that can respond to queries informed by a dataset. Our model isn’t novel; our domain is. We believe that open-sourcing our project is very unlikely to pose harm, but it can help those who wish to use the alignment research dataset, and further the field.
User Feedback and Collaboration
We plan to add a thumbs up or down option next to completions, such that we can A/B test our prompts, and fix common issues. We also are open to any kind of feedback, including bugs and features you would be interested in seeing, which you can share in this form.
In addition to user feedback, we are interested in collaborating with developers working on AI alignment tools. Our semantic embeddings of the Alignment Research Dataset may be valuable, saving others the effort and cost of creating their own version.
If you want to create a tool and you need our embeddings, message us. We’ll give you our embeddings.
Non-Conversational FAQ ;)
Q: Isn’t this just Bing but worse?
A: AlignmentSearch can be thought of as a hyper-specialized Bing powered by a slightly weaker LLM. It excels in finding AI Alignment-relevant paragraphs to use for completions, essentially functioning as a conversational Bing for AI alignment discussions.
Q: Isn’t the cutoff date for the alignment research dataset (last June) going to make it much less useful?
A: We are currently working to improve the dataset generation process and add the ability for the dataset to automatically update daily or weekly. This ongoing improvement process will make it easier for people to develop AI alignment tools based on a wide range of alignment knowledge.
Q: Can the AI handle more advanced and nuanced discussions on AI alignment, or is it limited to basic topics and misconceptions?
A: The chatbot is capable of handling a surprising range of discussions, but it does have its limits. We have internally tested with GPT-4 and, while the results are remarkable, it is impressive how good ChatGPT is when provided with a well-tailored prompt.
Honestly, we’re three students from McGill University. This project has been incredibly fun, and we’re shocked by how useful it has been both to us, and to help spread these ideas. We hope you can find value in it as well!
Cheers, AI Alignment McGill!
Try the website out here!