Merge pull request #3 from hwchase17/harrison/update-readmes

Harrison/update readmes
pull/5/head
Harrison Chase 1 year ago committed by GitHub
commit 1d2e4718f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,22 +1,15 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of API Response Prompts
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
Prompts used to convert the result of an API into natural language.
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `api_docs`: Docs for the API being hit.
2. `question`: Question to be answered.
3. `api_url`: URL that was hit.
4. `api_response`: The response returned from hitting said URL.
## Usage

@ -1,22 +1,13 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of API URL Prompts
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
Prompts used to construct an API URL to answer a specific question.
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `api_docs`: The documentation for a given API.
2. `question`: The question being asked of the API.
## Usage

@ -0,0 +1,26 @@
# Description of Conversation Prompt
Prompt designed to simulate having a conversation and allow for a conversational response to be returned.
## Inputs
This is a description of the inputs that the prompt expects.
1. `history`: History of the conversation up to that point.
2. `input`: New user input.
## Usage
Below is a code snippet for how to use the prompt.
```python
from langchain.prompts import load_from_hub
from langchain.chains import ConversationChain
llm = ...
prompt = load_from_hub('conversation/<file-name>')
chain = ConversationChain(llm=llm, prompt=prompt)
```

@ -1,34 +0,0 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
## Usage
Below is a code snippet for how to use the prompt.
```python
from langchain.prompts import load_from_hub
from langchain.chains import ConversationChain
llm = ...
prompt = load_from_hub('conversation/basic/<file-name>')
chain = ConversationChain(llm=llm, prompt=prompt)
```

@ -1,22 +1,6 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Hello World
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
Basic prompt designed to be use as a test case, will just instruct the LLM to say "Hello World".
## Usage

@ -1,22 +1,12 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of LLM Bash Prompt
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
Prompt designed to convert natural language to bash command.
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `question`: User question to be answered by writing a bash command.
## Usage
@ -25,10 +15,10 @@ Below is a code snippet for how to use the prompt.
```python
from langchain.prompts import load_from_hub
from langchain.chains import LLMBash
from langchain.chains import LLMBashChain
llm = ...
prompt = load_from_hub('llm_bash/<file-name>')
chain = LLMBash(llm=llm, prompt=prompt)
chain = LLMBashChain(llm=llm, prompt=prompt)
```

@ -1,22 +1,13 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of LLM Math Chain
# Description of {{prompt}}
Prompt designed to optionally output iPython syntax to be run in order to better answer math questions.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `question`: User question to be answered.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Summarize Memory Prompt
# Description of {{prompt}}
Prompt designed to summarize conversation history.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `summary`: Existing summary of conversation up to this point.
2. `new_lines`: New lines of conversation to be added into the summary.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of PAL Prompts
# Description of {{prompt}}
Prompts to be used with the [PAL](https://arxiv.org/pdf/2211.10435.pdf) chain.
These prompts should convert a natural language problem into a series of code snippets to be run to give an answer.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `question`: The question to be answered.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA Map Reduce Prompt
# Description of {{prompt}}
Prompts designed to be used in the initial question (map) step of a map-reduce chain to do question answering over a series of documents.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `context`: The document to be asking a question over.
2. `question`: The question being asked of the document.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA Map Reduce Prompt
# Description of {{prompt}}
Prompts designed to be used to reduce the answers generated during the map step.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `summaries`: Summaries generated during the map step.
2. `question`: Original question to be answered.
## Usage

@ -1,22 +1,15 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA Refine Prompts
# Description of {{prompt}}
Prompts designed to be used to refine original answers during question answering chains using the `refine` method.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `question`: Original question to be answered.
2. `existing_answer`: Existing answer from previous documents.
3. `context_str`: New piece of context to use to refine the existing answer.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA Stuff Prompts
# Description of {{prompt}}
Prompts to use when doing question answering with chains using the `stuff` method.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `context`: Context to answer the question, is usually a concatenation of all relevant documents.
2. `question`: Question to be answered.
## Usage

@ -1,8 +1,6 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA with Sources Map Reduce Prompts
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
Prompt
## Compatible Chains

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA with Sources Refine Prompts
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
Prompts used to do question answering with sources in chains that use the `refine` method.
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `question`: Original question to be answered.
2. `existing_answer`: Existing answer from previous documents.
3. `context_str`: New piece of context to use to refine the existing answer.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of QA with Sources Stuff Prompts
# Description of {{prompt}}
Prompts to use in question answering with sources chains that use the `stuff` method.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `summaries`: Concatenated summaries of all the documents.
2. `question`: Question to be answered.
## Usage

@ -1,22 +1,16 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Language-To-SQL Prompts
# Description of {{prompt}}
Prompts designed to convert language to relevant SQL query to execute.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `input`: Question to be answered.
2. `table_info`: Relevant information about the tables present in the schema.
3. `dialect`: Dialect of SQL to write the query in
4. `top_k`: Number of rows to return for most queries (used to avoid returning too much and overloading the context window).
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of SQL Relevant Tables
# Description of {{prompt}}
Prompts designed to identify relevant SQL tables to use to answer a query.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `query`: Question to be answered.
2. `table_names`: Table names available as options to pull in.
## Usage

@ -9,7 +9,7 @@ Question: {query}
Table Names: {table_names}
Relevant Table Names:"""
DECIDER_PROMPT = PromptTemplate(
PROMPT = PromptTemplate(
input_variables=["query", "table_names"],
template=_DECIDER_TEMPLATE,
output_parser=CommaSeparatedListOutputParser(),

@ -1,22 +1,13 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Summarize Map Reduce Prompts
# Description of {{prompt}}
Prompts designed to be used the in the map step of chains doing summarization with `map-reduce` method.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `text`: Text to be summarized.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Summarize Refine Prompt
# Description of {{prompt}}
Prompts designed to be used in summarization chains that use the `refine` method.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `existing_answer`: Existing summarization.
2. `text`: New text to be included in the summarization.
## Usage

@ -1,22 +1,12 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Summarization Stuff Prompts
# Description of {{prompt}}
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
Prompts designed to be used in summarization chains that use the `stuff` method.
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `text`: Text to be summarized.
## Usage

@ -1,22 +1,14 @@
<!-- Add a template for READMEs that capture the utility of prompts -->
# Description of Vector DB Question Answering Prompt
# Description of {{prompt}}
Prompts to be used in vector DB question answering chains.
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.
1. {{input_var}}: {{Description}}
2. ...
1. `context`: Documents pulled from the DB to do question answering over.
2. `question`: Question to ask of the documents.
## Usage

@ -4,13 +4,6 @@
{{High level text description of the prompt, including use cases.}}
## Compatible Chains
Below is a list of chains we expect this prompt to be compatible with.
1. {{Chain Name}}: {{Path to chain in module}}
2. ...
## Inputs
This is a description of the inputs that the prompt expects.

Loading…
Cancel
Save