The next wave, rag is all you need
- KEY MESSAGE
- The ability to understand and these methods on your application is critical: from talking to many partners and users, there is no "one-size-fits-all" solution because different problems require different retrieval techniques.
- Query Transformation
- Query expansion
- HyDE
- Routing
- Query Construction
- Building Index
- Chunk/Embedding experiments
- Fine-tune embeddings
- Post-Progressing
- Re-Ranking
- Classfication
Aspect | Problem | Resolution with HyDE |
---|---|---|
Retrieval | Inefficient zero-shot retrieval | Enhances zero-shot performance using language models |
Data Dependency | Heavy reliance on labeled data | Operates effectively without needing human-labeled data |
Generalization | Limited adaptability across languages and tasks | Improved generalization across various languages and tasks |
-
For example
- Who won a championship more recently, the Red Sox or the Patriots?
↓
- "When was the last time the Red Sox won a championship?"
- "When was the last time the Patriots won a championship?"
-
Implementation
- unable to install the chromed, grpcio
CFLAGS="-I/Library/Developer/CommandLineTools/usr/include/c++/v1 -I/opt/homebrew/opt/openssl/include" LDFLAGS="-L/opt/homebrew/opt/openssl/lib" pip3 instal grpcio
- I cannot use the OpenAI text embedding model, use hugging face model
from langchain.embeddings import HuggingFaceEmbeddings embeddings = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
- Use Azure Open AI instead of OpenAi API
- Resolve the chroma db issue
RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0. Please visit https://docs.trychroma.com/troubleshooting#sqlite to learn how to upgrade.
- refer the site to solve the issue to add three lines at the beginning of the code
__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
- refer
Deep Dive into the Internals of Langchain Vector Store Retriever
- Cohereの多言語用の埋め込みモデルを日本語で評価してみる
- 測定したデータセットにおいては、OpenAIの
text-embedding-ada-002
を上回る性能を示しており、性能の高いモデルであること - RAG But Better: Rerankers with Cohere AI
- Cohere Embed V3 - Nils Reimers | Vector Space Talks
- 測定したデータセットにおいては、OpenAIの
- RAG-fusion
9 Methods to Enhance the Performance of a LLM RAG Application