Skip to content

Persian RAG chatbot combining retrieval and generation for accurate, context-aware responses.

Notifications You must be signed in to change notification settings

FaNa-AI/ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  RAG Chatbot (Retrieval-Augmented Generation)

A simple Persian-language chatbot based on the Retrieval-Augmented Generation (RAG) architecture. It combines:

  • A model to retrieve relevant information from a small knowledge base
  • A language model to generate natural language responses

๐Ÿš€ Features

  • Supports Persian language queries and responses
  • Uses Hugging Face Transformers for text generation
  • Employs Sentence Transformers for semantic similarity
  • Simple and educational structure for learning RAG concepts

๐Ÿ›  Technologies Used

  • transformers (for GPT-2 or compatible models)
  • sentence-transformers (for sentence embeddings)
  • scikit-learn (for cosine similarity)
  • PyTorch (for model execution)

๐Ÿงฉ How It Works

  1. Retrieve relevant knowledge from a simple knowledge base using semantic similarity.
  2. Build a context prompt using the retrieved information and the user query.
  3. Generate a response using a causal language model (e.g., GPT-2).

๐Ÿ“ฆ Installation

pip install torch transformers sentence-transformers scikit-learn numpy






About

Persian RAG chatbot combining retrieval and generation for accurate, context-aware responses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages