GithubHelp home page GithubHelp logo

rzarno / llm-chatbot-rag-langchain Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 250 KB

RAG (Retrieval-augmented generation) and langchain chat bot example

License: GNU General Public License v3.0

Python 100.00%

llm-chatbot-rag-langchain's Introduction

chatbot based on language model with access to source documents

LLM (Large Language Model) based chat bot using RAG (Retrieval-augmented generation) and langchain. Chat bot has access to trade register documents related to Ticos Systems company and is able to answer any question related to this company not only giving answer but also referencing the source document.

as language model HuggingFaceH4/zephyr-7b-beta was used to run chat in browser streamlit library was used

based on article https://medium.com/mlearning-ai/create-a-chatbot-in-python-with-langchain-and-rag-85bfba8c62d2

Usage

  1. before run install needed libraries as below: pip install langchain faiss-cpu openai tiktoken InstructorEmbedding sentence-transformers streamlit python-dotenv pandas trafilatura

  2. create .env file with hugiingface token environment variable HUGGINGFACEHUB_API_TOKEN=your_token_from_huggingface.com

  3. run script with command: streamlit run index.py

To run it for your purpose you can replace source documents in /data dir and prompt in index.py.

llm-chatbot-rag-langchain's People

Watchers

Michał Żarnecki avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.