• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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:

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:

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:

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:

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:

Run the PromptHub API by yourself

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

$ 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:

$ 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:
$ 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:
$ go build
  • Run the server with:
$ ./prompthub
  • Run the tests with:
$ go test ./...

More Repositories

1

haystack

🔍 LLM orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
Python
14,953
star
2

FARM

🏡 Fast & easy transfer learning for NLP. Harvesting language models for the industry. Focus on Question Answering.
Python
1,736
star
3

haystack-cookbook

👩🏻‍🍳 A collection of example notebooks
Jupyter Notebook
362
star
4

COVID-QA

API & Webapp to answer questions about COVID-19. Using NLP (Question Answering) and trusted data sources.
Jupyter Notebook
344
star
5

haystack-tutorials

Here you can find all the Tutorials for Haystack 📓
Jupyter Notebook
238
star
6

haystack-demos

Fully working applications that demonstrate how to use Haystack to implement common NLP use cases
Python
102
star
7

haystack-core-integrations

Additional packages (components, document stores and the likes) to extend the capabilities of Haystack version 2.0 and onwards
Python
81
star
8

haystack-integrations

🚀 A list of Haystack Integrations, maintained by the community or deepset.
54
star
9

rasa-haystack

Python
46
star
10

haystack-website

Contents moved to https://github.com/deepset-ai/haystack-home
TypeScript
31
star
11

hayhooks

Deploy Haystack pipelines behind a REST Api.
Python
30
star
12

rag-with-nvidia-nims

🚀 Use NVIDIA NIMs with Haystack pipelines
Python
28
star
13

canals

A component orchestration engine
Python
27
star
14

haystack-search-pipeline-streamlit

🚀 Template Haystack Search Application with Streamlit
Python
21
star
15

haystack-home

Website for Haystack, the open source LLM framework
HTML
13
star
16

haystack-sagemaker

🚀 This repo is a showcase of how you can use models deployed on AWS SageMaker in your Haystack Retrieval Augmented Generative AI pipelines
Jupyter Notebook
13
star
17

haystack-helm

Repo containing haystack helm charts
Smarty
8
star
18

haystack-experimental

Python
8
star
19

deepset-cloud-sdk

A Python SDK to interact with deepset Cloud
Python
8
star
20

biqa-llm

Python
8
star
21

visualizer-source-text

Source text for deepset Cloud pipeline nodes
5
star
22

haystack-evaluation

Using Haystack to benchmark different architectures over different datasets
Jupyter Notebook
5
star
23

haystack-rest-api

Python
5
star
24

document-store

Python
5
star
25

rag-ui-nextjs

An example of a simple UI for a deepset Cloud RAG pipeline using Next.js
JavaScript
4
star
26

templates

Usable templates for your work.
3
star
27

prompthub-py

Python
3
star
28

charts

Smarty
1
star
29

haystack-json-schema

JSON Schema for validating Haystack Pipeline YAML files
1
star
30

.github

1
star