Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Latest commit

 

History

History
61 lines (42 loc) · 1.61 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.61 KB

LTA Challenge

Incorporate new LTA-related information (September 2021 and beyond) into an OpenAI GPT model.

Sample question: How do I view my digital vocational licence?

Without the latest LTA information: wrong answer...

wrong answer

With the latest LTA information: correct answer!

correct answer

Prerequisites

Operating System: macOS Ventura 13.3 / Ubuntu 22.04
Programming Language: Python 3.10

Set-up

Create and activate a virtual environment:

python3 -m venv venv
source venv/bin/activate

Run the following commands to set up the environment:

pip install -r requirements.txt
pre-commit install

Create a .env file with the following content:

OPENAI_API_KEY=your_api_key

Run

Start a chat session to enquire about latest LTA information:

python main.py

Start a chat session without the latest LTA information:

python main.py --nolta

References

  1. LTA News Room
  2. Beautiful Soup Documentation
  3. OpenAI question-answering: Finetuning GPT-3 vs Semantic Search
  4. OpenAI pricing
  5. Chat completion
  6. What are embeddings
  7. Question-answering using embeddings cookbook