Code Monkey home page Code Monkey logo

ollama-url-driven-chatbot's Introduction

Document Query Chatbot with Ollama Mistral

Overview This project showcases a chatbot built using the Ollama Mistral model. The chatbot can process documents from specified URLs and answer questions based on the content of those documents. The system uses Retrieval-Augmented Generation (RAG) to enhance the accuracy and relevance of the responses. The project is implemented in two Python files: app.py and ui.py.

Files app.py This script demonstrates the core functionality of the chatbot:

Data Loading: Loads documents from specified URLs. Text Splitting: Splits documents into manageable chunks. Embedding Generation: Converts document chunks into embeddings and stores them in a vector store. Before and After RAG: Shows the chatbot's response without context (Before RAG) and with context (After RAG).

ui.py This script provides a user interface using Gradio:

User Input Processing: Takes URLs and a question as input. Data Loading and Processing: Loads documents, splits them, and stores embeddings similar to app.py. RAG Implementation: Answers the question based on the context extracted from the documents. Gradio Interface: Provides a simple web-based UI for users to interact with the chatbot.

How to Run Install Dependencies: pip install langchain_community gradio

Run the App: For the core functionality: python app.py

For the user interface: python ui.py

What I Learned Language Models: Gained hands-on experience with the Ollama Mistral model for natural language processing tasks. Data Processing: Learned to handle and process large textual data by splitting documents into chunks and generating embeddings. Retrieval-Augmented Generation (RAG): Implemented RAG to improve the relevance of the chatbot's responses, demonstrating the importance of context in NLP applications. Web-based Interfaces: Utilized Gradio to create a user-friendly interface, making it easier for users to interact with the chatbot.

ollama-url-driven-chatbot's People

Contributors

ivotomasovich avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  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.