Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add a prompt template parameter to qa with structure chains #6495

Merged

Conversation

ElReyZero
Copy link
Contributor

@ElReyZero ElReyZero commented Jun 20, 2023

Description of Changes

This pull request introduces a new feature to the LangChain QA Retrieval Chains with Structures. The change involves adding a prompt template as an optional parameter for the RetrievalQA chains that utilize the recently implemented OpenAI Functions.

The main purpose of this enhancement is to provide users with the ability to input a more customizable prompt to the chain. By introducing a prompt template as an optional parameter, users can tailor the prompt to their specific needs and context, thereby improving the flexibility and effectiveness of the RetrievalQA chains.

Changes Made

  • Created a new optional parameter, "prompt", for the RetrievalQA with structure chains.
  • Added an example to the RetrievalQA with sources notebook.

My twitter handle is @El_Rey_Zero

@vercel
Copy link

vercel bot commented Jun 20, 2023

@ElReyZero is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@ElReyZero ElReyZero force-pushed the feat/custom-prompt-qa-functions branch from 4e1129f to fd396cd Compare June 20, 2023 19:28
@ElReyZero ElReyZero changed the title Feat: Add a prompt template for qa with structure chains Feat: Add a prompt template parameter to qa with structure chains Jun 20, 2023
@vercel
Copy link

vercel bot commented Jun 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Jun 21, 2023 0:30am

@dev2049 dev2049 added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jun 21, 2023
@dev2049 dev2049 merged commit ab7ecc9 into langchain-ai:master Jun 21, 2023
14 checks passed
@dev2049
Copy link
Contributor

dev2049 commented Jun 21, 2023

thanks @ElReyZero!

tconkling added a commit to tconkling/langchain that referenced this pull request Jun 21, 2023
* master: (28 commits)
  [Feature][VectorStore] Support StarRocks as vector db (langchain-ai#6119)
  Relax string input mapper check (langchain-ai#6544)
  bump to ver 208 (langchain-ai#6540)
  Harrison/multi tool (langchain-ai#6518)
  Infino integration for simplified logs, metrics & search across LLM data & token usage (langchain-ai#6218)
  Update model token mappings/cost to include 0613 models (langchain-ai#6122)
  Fix issue with non-list `To` header in GmailSendMessage Tool (langchain-ai#6242)
  Integrate Rockset as Vectorstore (langchain-ai#6216)
  Feat: Add a prompt template parameter to qa with structure chains (langchain-ai#6495)
  Add async support for HuggingFaceTextGenInference (langchain-ai#6507)
  Be able to use Codey models on Vertex AI (langchain-ai#6354)
  Add KuzuQAChain (langchain-ai#6454)
  Update index.mdx (langchain-ai#6326)
  Export trajectory eval fn (langchain-ai#6509)
  typo(llamacpp.ipynb): 'condiser' -> 'consider' (langchain-ai#6474)
  Fix typo in docstring of format_tool_to_openai_function (langchain-ai#6479)
  Make streamlit import optional (langchain-ai#6510)
  Fixed: 'readible' -> readable (langchain-ai#6492)
  Documentation Fix: Correct the example code output in the prompt templates doc (langchain-ai#6496)
  Fix link (langchain-ai#6501)
  ...
This was referenced Jun 25, 2023
kacperlukawski pushed a commit to kacperlukawski/langchain that referenced this pull request Jun 29, 2023
…ngchain-ai#6495)


This pull request introduces a new feature to the LangChain QA Retrieval
Chains with Structures. The change involves adding a prompt template as
an optional parameter for the RetrievalQA chains that utilize the
recently implemented OpenAI Functions.

The main purpose of this enhancement is to provide users with the
ability to input a more customizable prompt to the chain. By introducing
a prompt template as an optional parameter, users can tailor the prompt
to their specific needs and context, thereby improving the flexibility
and effectiveness of the RetrievalQA chains.

## Changes Made
- Created a new optional parameter, "prompt", for the RetrievalQA with
structure chains.
- Added an example to the RetrievalQA with sources notebook.

My twitter handle is @El_Rey_Zero

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
aerrober pushed a commit to aerrober/langchain-fork that referenced this pull request Jul 24, 2023
…ngchain-ai#6495)


This pull request introduces a new feature to the LangChain QA Retrieval
Chains with Structures. The change involves adding a prompt template as
an optional parameter for the RetrievalQA chains that utilize the
recently implemented OpenAI Functions.

The main purpose of this enhancement is to provide users with the
ability to input a more customizable prompt to the chain. By introducing
a prompt template as an optional parameter, users can tailor the prompt
to their specific needs and context, thereby improving the flexibility
and effectiveness of the RetrievalQA chains.

## Changes Made
- Created a new optional parameter, "prompt", for the RetrievalQA with
structure chains.
- Added an example to the RetrievalQA with sources notebook.

My twitter handle is @El_Rey_Zero

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants