mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-10 12:40:44 +08:00
Update README.md
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
# AlignmentSearch
|
||||
# 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:
|
||||
|
||||
## Project Layout
|
||||
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.
|
||||
|
||||
- `src/` stuff around processing our dataset and constructing embeddings
|
||||
- `api/` a flask app serving as our backend
|
||||
- `web/` a NextJS app for the frontend
|
||||
## 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.
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
# AlignmentSearch
|
||||
|
||||
This project creates embeddings for every set of a few paragraphs from the source dataset, in order to do real-time semantic search and question answering on them.
|
||||
|
||||
The very barebones of the project is currently in src/testing.ipynb. file which contains:
|
||||
|
||||
To try out, add a src/config.py file which contains your OPENAI_API_KEY.
|
||||
|
||||
## TODO:
|
||||
- Getting data:
|
||||
- Figure out the right format for the dataset
|
||||
- Get entirety of data
|
||||
- Searches for new posts/papers/etc and scrape them, runs once a day
|
||||
- Async API calls for embeddings (otherwise it is going to take years)
|
||||
- Semantic search:
|
||||
- Test out other techniques than just vector similarity (e.g. LSH-index, see Dense Retrieval methods (here)[https://medium.com/@aikho/deep-learning-in-information-retrieval-part-ii-dense-retrieval-1f9fecb47de9])
|
||||
- Test other embeddings models ((SimCSE)[https://github.com/princeton-nlp/SimCSE] possibly SOTA?)
|
||||
- Question answering:
|
||||
- Test out other models prompts to see which is best
|
||||
- Summarization:
|
||||
- Test out other models and prompts to see which is best (Forefront?)
|
||||
- Info extraction from PDF:
|
||||
- Specifically mentioned by Anson. Look into methods by Mely.ai to extract tables from PDFs maybe?
|
||||
- Test various techniques to make it more performant
|
||||
- Finetuning:
|
||||
- Finetune embeddings model
|
||||
- Finetune q&a model
|
||||
- Finetune summarization model
|
||||
- Finetune info extraction model
|
||||
- Other:
|
||||
- Create website/other. Not sure what would be most helpful here (Find someone that can figure this out)
|
||||
- Document search (give descriptions of a post/document/video/article/book/etc related to alignment, and get top semantically related result)
|
||||
|
||||
## Ideas
|
||||
- The whole dataset with embeddings doesn't fit on the frontend, but requests take a while. Solution: have a useful but small fraction of the dataset on the front end, get similarity score for embeddings, and do real time semantic search. However, every time the user presses space or enter, do the call to do semantic search over the full dataset.
|
||||
|
||||
|
||||
Source dataset: Kirchner, J. H., Smith, L., Thibodeau, J., McDonnell, K., and Reynolds, L. "Understanding AI alignment research: A Systematic Analysis." arXiv preprint arXiv:2022.4338861 (2022).
|
||||
Reference in New Issue
Block a user