https://github.com/deepset-ai/prompthub

https://github.com/deepset-ai/prompthub

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.3%) to scientific vocabulary

Keywords

llm nlp prompt-engineering
Last synced: 6 months ago · JSON representation

Repository

Basic Info
Statistics
  • Stars: 160
  • Watchers: 9
  • Forks: 18
  • Open Issues: 10
  • Releases: 0
Topics
llm nlp prompt-engineering
Created about 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

PromptHub

PromptHub serves a collection of ready-made prompts for the most common NLP tasks. The service is deployed at the public URL https://api.prompthub.deepset.ai and there's a nice UI to browse the prompts at https://prompthub.deepset.ai.

Prompt format

A prompt is defined in a yaml file with the following format:

yaml name: an-example text: Your prompt text goes here description: A brief description of what your prompt is for tags: - translation meta: authors: - your name version: v0.1

PromptHub API

Get all the prompts

GET /prompts

Request:

sh curl -i -H 'Accept: application/json' https://api.prompthub.deepset.ai/prompts

Response:

``` HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Fri, 24 Mar 2023 07:59:55 GMT Content-Length: 42

[ { "name":"deepset/an-example-prompt", "tags":["question-answering"], "meta":{"authors":["Alice","Bob"]}, "version":"1.0", "text":"My prompt text", "description":"Provides a prompt for question answering with references to documents" } ] ```

Get a specific prompt by name

GET /prompts/prompt-name

Request:

sh curl -i -H 'Accept: application/json' https://api.prompthub.deepset.ai/prompts/prompt-name

Response:

``` HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Fri, 24 Mar 2023 08:06:19 GMT Content-Length: 211

{"name":"prompt-name","tags":["translation"],"meta":{"authors":["vblagoje"]},"version":"v0.1.0","text":"Your prompt text goes here","description":"Prompt to translate text into a target language"} ```

Get a model card by model name

Request:

sh curl -i https://api.prompthub.deepset.ai/cards/prompt-name

Response:

``` HTTP/1.1 200 OK Content-Type: text/plain; charset=utf-8 Vary: Origin Date: Wed, 07 Jun 2023 10:46:53 GMT Content-Length: 762

This prompt is simply designed to answer a query given a set of documents. There will be 1 answer generated.

... ```

API clients

You can consume the PromptHub API natively from one of the supported languages: - Python: https://github.com/deepset-ai/prompthub-py - Typescript: https://github.com/deepset-ai/prompthub-ts

Run the PromptHub API by yourself

The easiest way to run the PromptHub API on your premises is to use the official Docker image:

sh $ docker run -p80:80 deepset/prompthub INFO Prompthub running at 0.0.0.0:80

You can also serve your very own set of prompts by overriding the default prompts folder in the container:

sh $ docker run -p80:80 --volume $PWD/path/to/your/prompts:/prompts deepset/prompthub INFO Prompthub running at 0.0.0.0:80

Development

You can build and run the PromptHub API service locally following these steps:

  • Ensure you have a recent version of Go installed:

sh $ go version go version go1.20.2 darwin/arm64

If you get an error, follow the install instructions from the [official documentation](https://go.dev/doc/install) and
try again.
  • From the root of the repo, build the binary with:

sh $ go build

  • Run the server with:

sh $ ./prompthub

  • Run the tests with:

sh $ go test ./...

Owner

  • Name: deepset
  • Login: deepset-ai
  • Kind: organization
  • Email: hello@deepset.ai
  • Location: Berlin, Germany

Building enterprise search systems powered by latest NLP & open-source.

GitHub Events

Total
  • Watch event: 30
  • Issue comment event: 2
  • Pull request event: 3
  • Fork event: 2
Last Year
  • Watch event: 30
  • Issue comment event: 2
  • Pull request event: 3
  • Fork event: 2

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 31
  • Total pull requests: 60
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 5 days
  • Total issue authors: 12
  • Total pull request authors: 12
  • Average comments per issue: 0.48
  • Average comments per pull request: 0.22
  • Merged pull requests: 53
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 3 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • TuanaCelik (5)
  • bilgeyucel (3)
  • ZanSara (2)
  • masci (2)
  • mathislucka (1)
  • linaund1000 (1)
  • sybernomad (1)
  • dfokina (1)
  • tstadel (1)
  • AyhamB (1)
  • tholor (1)
Pull Request Authors
  • silvanocerza (11)
  • bilgeyucel (4)
  • masci (3)
  • TuanaCelik (3)
  • AbhishekRP2002 (2)
  • ZanSara (2)
  • vblagoje (2)
  • tewnut (1)
  • nehaP-21 (1)
  • julian-risch (1)
  • FHardow (1)
  • brianjking (1)
  • tholor (1)
Top Labels
Issue Labels
P1 (4) documentation (2) bug (1) wontfix (1) P3 (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
proxy.golang.org: github.com/deepset-ai/prompthub
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 5.9%
Forks count: 8.3%
Average: 8.4%
Dependent packages count: 8.9%
Dependent repos count: 10.6%
Last synced: 6 months ago

Dependencies

.github/workflows/docker-release.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v4 composite
  • docker/login-action v2 composite
.github/workflows/ecs-deploy.yml actions
  • actions/checkout v3 composite
  • aws-actions/amazon-ecs-deploy-task-definition v1 composite
  • aws-actions/amazon-ecs-render-task-definition v1 composite
  • aws-actions/configure-aws-credentials v2 composite
  • masci/datadog v1 composite
.github/workflows/project.yml actions
  • actions/add-to-project v0.3.0 composite
.github/workflows/prompt-validation.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • tj-actions/changed-files v34 composite
Dockerfile docker
  • alpine 3.17 build
  • golang 1.20-alpine build
go.mod go
  • github.com/ajg/form v1.5.1
  • github.com/fsnotify/fsnotify v1.6.0
  • github.com/go-chi/chi/v5 v5.0.8
  • github.com/go-chi/cors v1.2.1
  • github.com/go-chi/render v1.0.2
  • github.com/hashicorp/hcl v1.0.0
  • github.com/magiconair/properties v1.8.7
  • github.com/mitchellh/mapstructure v1.5.0
  • github.com/pelletier/go-toml/v2 v2.0.6
  • github.com/spf13/afero v1.9.3
  • github.com/spf13/cast v1.5.0
  • github.com/spf13/jwalterweatherman v1.1.0
  • github.com/spf13/pflag v1.0.5
  • github.com/spf13/viper v1.15.0
  • github.com/subosito/gotenv v1.4.2
  • golang.org/x/sys v0.3.0
  • golang.org/x/text v0.5.0
  • gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
  • gopkg.in/ini.v1 v1.67.0
  • gopkg.in/yaml.v3 v3.0.1
go.sum go
  • 463 dependencies
.github/utils/requirements.txt pypi
  • PyYAML ==6.0