Skip to content

vasilisvyth/rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d915e7 · Nov 14, 2024

History

12 Commits
Nov 14, 2024
Oct 28, 2024
Nov 14, 2024
Nov 14, 2024
Oct 28, 2024
Nov 14, 2024
Oct 28, 2024
Nov 14, 2024
Oct 28, 2024
Oct 28, 2024
Oct 28, 2024
Oct 28, 2024
Oct 28, 2024
Nov 14, 2024
Oct 28, 2024

Repository files navigation

Data can be found here

Execute run.py to obtain the RAG results.

Chunking

We currently support the following chunking methods in split_text.py:

  • RecursiveCharacterTextSplitter
  • CharacterTextSplitter
  • SemanticChunker

Retrieval Stage

In the retrieval stage, we support (see retrieval_utils.py):

  • Retrieving similar documents to a given query
  • Using the Hyde method, which first generates a synthetic document that is then compared with the index

Evaluation

For evaluation, we also utilize the following objects in metrics.py:

  • deepeval GEval
  • FaithfulnessMetric

Set Environment Variables:

pip install python-dotenv

In the root directory of your project, create a file named .env and add the following variables:

LANGCHAIN_TRACING_V2=true LANGCHAIN_API_KEY="YOUR_LANGCHAIN_KEY" LANGCHAIN_ENDPOINT="https://api.smith.langchain.com" LANGCHAIN_PROJECT="YOUR_PROJECT_NAME" OPENAI_API_KEY="YOUR_OPENAI_KEY"

Replace each placeholder (e.g., YOUR_LANGCHAIN_KEY, YOUR_PROJECT_NAME, and YOUR_OPENAI_KEY) with your actual values.

By configuring these environment variables, you can monitor metrics like latency usage, and other performance indicators through the LangSmith dashboard.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages