Fast_Sentence_Embeddings
gpt4-pdf-chatbot-langchain
Fast_Sentence_Embeddings | gpt4-pdf-chatbot-langchain | |
---|---|---|
3 | 32 | |
603 | 14,573 | |
- | - | |
0.0 | 3.9 | |
about 1 year ago | about 1 month ago | |
Jupyter Notebook | TypeScript | |
GNU General Public License v3.0 only | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Fast_Sentence_Embeddings
-
The Illustrated Word2Vec
This is a great guide.
Also - despite the fact that language model embedding [1] are currently the hot rage, good old embedding models are more than good enough for most tasks.
With just a bit of tuning, they're generally as good at many sentence embedding tasks [2], and with good libraries [3] you're getting something like 400k sentence/sec on laptop CPU versus ~4k-15k sentences/sec on a v100 for LM embeddings.
When you should use language model embeddings:
- Multilingual tasks. While some embedding models are multilingual aligned (eg. MUSE [4]), you still need to route the sentence to the correct embedding model file (you need something like langdetect). It's also cumbersome, with one 400mb file per language.
For LM embedding models, many are multilingual aligned right away.
- Tasks that are very context specific or require fine-tuning. For instance, if you're making a RAG system for medical documents, the embedding space is best when it creates larger deviations for the difference between seemingly-related medical words.
This means models with more embedding dimensions, and heavily favors LM models over classic embedding models.
1. sbert.net
2. https://collaborate.princeton.edu/en/publications/a-simple-b...
3. https://github.com/oborchers/Fast_Sentence_Embeddings
4. https://github.com/facebookresearch/MUSE
-
You probably shouldn't use OpenAI's embeddings
You can find some comparisons and evaluation datasets/tasks here: https://www.sbert.net/docs/pretrained_models.html
Generally MiniLM is a good baseline. For faster models you want this library:
https://github.com/oborchers/Fast_Sentence_Embeddings
For higher quality ones, just take the bigger/slower models in the SentenceTransformers library
-
[D] Unsupervised document similarity state of the art
Links: fse: https://github.com/oborchers/Fast_Sentence_Embeddings Sentence-transformers: https://github.com/oborchers/sentence-transformers
gpt4-pdf-chatbot-langchain
-
Back and forth conversations before a vector search?
I am playing around with this github project, which takes a user question as input and immediately runs a vector search on it to find relevant storied information before delivering an answer.
-
How do I ask a meta question to a document? (Retrieval augmented generation, langchain, pinecone)
I am using this https://github.com/mayooear/gpt4-pdf-chatbot-langchain as a reference to ingest PDFs into pinecone and chat with a document, but my results aren’t good. Since it’s looking for related documents, there’s no good relation to the meta question: “What questions were asked in this interview?”
-
Recently I launched dataspot Ai tool for students and academics, that turns any type of content such as research paper, website, or YouTube video into interactive chatbot. You can effortlessly retrieve information, obtain summaries. Google "dataspot ai" & let me know what you think :)
Anyone can already do this locally with their own API keys for free, with no technical knowledge by cloning a github repo (e.g. https://github.com/mayooear/gpt4-pdf-chatbot-langchain - this one can also chat with multiple pdfs which is much better). Even with gpt-4, I just don't find the responses useful usually. I find the model doesn't do great with scientific stuff aside from asking very basic things. Might have to wait for gpt-5.
-
Chat with Documents using Open source LLMs
https://github.com/mayooear/gpt4-pdf-chatbot-langchain this repo uses gpt-3.5/4 which uses OpenAI API. Is there any work donw with free/open-source LLMs
- Using ChatGPT to read multiple PDFs and create writing using them as sources
-
How do you train GPT on your own documents?
Follow this guide https://github.com/mayooear/gpt4-pdf-chatbot-langchain
-
Best GPT-based tool for summarizing PDFs/long docs
I am using this one on windows 10. Took 2 evenings to set up: https://github.com/mayooear/gpt4-pdf-chatbot-langchain
-
Earthling Ed ChatGPT type AI
Thanks for your take on the subject. I agree that starting from scratch would be too much. I think my post above might be misleading in regard to training. I wouldn't suggest to start from scratch but to provide additional data to a pretrained AI. But you can use GPT-4 (through API) in combination with pinecone to provide data. Here is a project, where someone implemented this to work with large PDF files. I don't think it would be too hard, to start from there and adapt the project to the requirements of OP. Obviously this would require paid for API keys. LLama could be also a good starting point, with a lot of resources available.
-
Seeking Cost-Effective Alternatives and Optimization Tips for a GPT-based PDF Chatbot
I'm currently developing a chatbot application that interacts with PDF documents using GPT API, Langchain, and a Pinecone vector database. The project is built on this repository: mayooear/gpt4-pdf-chatbot-langchain.
- ChatGPT for your files - Discovered an AI research tool that allows you to ask questions across multiple files all at once and get instant answers with highlighted references
What are some alternatives?
gensim - Topic Modelling for Humans
openai-cookbook - Examples and guides for using the OpenAI API
smaller-labse - Applying "Load What You Need: Smaller Versions of Multilingual BERT" to LaBSE
localGPT - Chat with your documents on your local device using GPT models. No data leaves your device and 100% private.
cso-classifier - Python library that classifies content from scientific papers with the topics of the Computer Science Ontology (CSO).
private-gpt - Interact with your documents using the power of GPT, 100% privately, no data leaks
kgtk - Knowledge Graph Toolkit
marqo - Unified embedding generation and search engine. Also available on cloud - cloud.marqo.ai
RecSys_Course_AT_PoliMi - This is the official repository for the Recommender Systems course at Politecnico di Milano.
vault-ai - OP Vault ChatGPT: Give ChatGPT long-term memory using the OP Stack (OpenAI + Pinecone Vector Database). Upload your own custom knowledge base files (PDF, txt, epub, etc) using a simple React frontend.
sentence-transformers - Sentence Embeddings with BERT & XLNet
chatpdf-gpt - ChatPDF-GPT is an innovative chat interface application powered by LangChain and OpenAI, allowing users to upload and chat with PDF documents, stored in Pinecone vector database and Supabase storage.