mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-12 13:00:42 +08:00
Merge branch 'instructions' into stampy_main
This commit is contained in:
@@ -22,6 +22,44 @@ In general, the Stampy project serves users at 3 levels of understanding:
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Environment Setup
|
||||
|
||||
In the `api/` directory, rename `.env.example` to `.env`. Edit this file and
|
||||
fill in the placeholder values with valid credentials. Message the
|
||||
`#stampy-dev` channel on the [Rob Miles AI
|
||||
Discord](https://discord.com/invite/Bt8PaRTDQC) if you need help with this.
|
||||
|
||||
### Running a local version
|
||||
|
||||
Open two terminal windows. In the first, run:
|
||||
|
||||
```bash
|
||||
cd api
|
||||
pip install -r requirements.txt # (skip this line after the first time)
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
In the second, run:
|
||||
|
||||
```bash
|
||||
cd web
|
||||
npm install # (skip this line after the first time)
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 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).
|
||||
@@ -31,4 +69,4 @@ Name | Demo App | Code Notes
|
||||
-- | -- | --
|
||||
McGill's AlignmentSearch | https://alignmentsearch.up.railway.app/ | https://github.com/FraserLee/AlignmentSearch<br>https://tinyurl.com/alignmentsearchgdocs
|
||||
Craig's AlignmentGPT | http://tidblitz.com/ | https://github.com/cvarrichio/alignmentchat
|
||||
Stampy's Chat | http://chat.stampy.ai/ | https://github.com/ccstan99/stampy-chat<br>https://github.com/stampyAI/stampy-nlp/
|
||||
Stampy's Chat | http://chat.stampy.ai/ | https://github.com/ccstan99/stampy-chat<br>https://github.com/stampyAI/stampy-nlp/
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
OPENAI_API_KEY="sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||
PINECONE_API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||
-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).
|
||||
@@ -1,14 +0,0 @@
|
||||
# Since the ".env" file is gitignored, you can use the ".env.example" file to
|
||||
# build a new ".env" file when you clone the repo. Keep this file up-to-date
|
||||
# when you add new variables to `.env`.
|
||||
|
||||
# This file will be committed to version control, so make sure not to have any
|
||||
# secrets in it. If you are cloning this repo, create a copy of this file named
|
||||
# ".env" and populate it with your secrets.
|
||||
|
||||
# When adding additional environment variables, the schema in "/src/env.mjs"
|
||||
# should be updated accordingly.
|
||||
|
||||
# Example:
|
||||
# SERVERVAR="foo"
|
||||
# NEXT_PUBLIC_CLIENTVAR="bar"
|
||||
Reference in New Issue
Block a user