gpt-3-experiments  by minimaxir

GPT-3 prompt testing and experimentation

Created 5 years ago
700 stars

Top 48.7% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a collection of test prompts and unedited AI-generated texts from OpenAI's GPT-3 API, showcasing the model's capabilities and limitations. It's designed for researchers, developers, and users experimenting with large language models who want to explore prompt engineering and observe raw model outputs.

How It Works

The project leverages OpenAI's GPT-3 API, specifically the davinci model. It systematically tests prompts across various temperatures (0.0 for deterministic output, 0.7, 1.0, and 1.2 for increasing creativity) to generate up to 512 tokens per text. The collected outputs are stored unedited, allowing for direct analysis of the model's responses.

Quick Start & Requirements

  • Install dependencies: pip3 install httpx pyyaml fire tqdm
  • Configure config.yml with your OpenAI API secret key.
  • Run via command line: python3 openai_api.py "Your prompt" or python3 openai_api.py "path/to/prompt.txt"
  • Requires Python 3.6+.
  • OpenAI API access is necessary.

Highlighted Details

  • Demonstrates GPT-3 outputs at multiple temperatures (0.0, 0.7, 1.0, 1.2).
  • Includes a Python script for efficient API querying.
  • Outputs are saved as Markdown by default for better GitHub rendering.
  • Content warnings are provided for potentially offensive generated text.

Maintenance & Community

Maintained by Max Woolf (@minimaxir), whose work is supported via Patreon and GitHub Sponsors.

Licensing & Compatibility

MIT License. Compatible with commercial use.

Limitations & Caveats

The script uses synchronous requests with a 30-second delay between API calls to avoid straining OpenAI's infrastructure. Generated text may be offensive and is uncurated.

Health Check
Last Commit

5 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
6 more.

prompt-engine by microsoft

0.1%
3k
NPM library for LLM prompt engineering
Created 3 years ago
Updated 2 years ago
Feedback? Help us improve.