Skip to content

RAG.ts is a lightweight and advanced document retrieval library that enables smart document retrieval for Retrieval-Augmented Generation (RAG) use cases.

Notifications You must be signed in to change notification settings

a7993n/basic-rag-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG.ts - Retrieval-Augmented Generation Library

RAG.ts is a lightweight and advanced document retrieval library that enables smart document retrieval for Retrieval-Augmented Generation (RAG) use cases. It provides advanced techniques like TF-IDF scoring, fuzzy matching, and contextual weighting to retrieve relevant documents based on user queries.

Features

  • TF-IDF Scoring: Ranks documents by the importance of the query terms.
  • Fuzzy Matching: Matches user queries even with typos or similar terms.
  • Contextual Weighting: Boosts relevance for title matches and keyword proximity.
  • Top-N Retrieval: Returns the most relevant documents based on a query.

Installation

npm install

Build

npm run build

Example

node ./dist/example.js

About

RAG.ts is a lightweight and advanced document retrieval library that enables smart document retrieval for Retrieval-Augmented Generation (RAG) use cases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published