Giter Club home page Giter Club logo

llm-question-answering's Introduction

llm-question-answering

llm-question-answering is a simple Python project that answers questions using a LLM, with an added feature that it uses semantic search across user provided documents used to provide specific context to the LLM.

This python project uses the following technologies by default:

  • openai, beautifulsoup, and scikit-learn for the core features of the model
  • MkDocs for documentation
  • GitHub Actions for continuous integration
  • flake8, mypy, and pylint for linting
  • pytest for unit testing and integration testing
  • Docker for creating containerized applications

Installation

To install [PROJECT_NAME], run the following command:

python setup.py install

Usage

An example of using the python API:

import os
from composable_llm import DocumentLoader, LSASearchEngine, GPT3Model

question = "What is a commonality of wealth distribution between developed nations?"

# Create the models
doc_loader = DocumentLoader()
doc_loader.load_documents(file_path='.data/wiki-dow.html')
search = LSASearchEngine(docs=doc_loader.docs[0], n_components=5)
search.fit()
chatbot = GPT3Model(os.getenv("OPENAI_API_KEY"))

# Use the core features
context = search.search(question)
response = chatbot.ask(context, question)
print(response)

An example of interacting with the python module using a CLI

PYTHONPATH=./ python composable_llm/core.py -s $OPENAI_API_KEY -f ./data/wiki-dow.html

Contributing

We welcome contributions to [PROJECT_NAME]! Please see CONTRIBUTING.md for more information.

License llm-question-answering is released under the MIT License.

Generating Documentation

From the root directory run:

mkdocs build

llm-question-answering's People

Contributors

jaffourt avatar

Watchers

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