fix: modify thought prompt (#2626)

# Description

Change the prompt of the thoughts feature to have more steps.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
This commit is contained in:
Chloé Daems 2024-05-28 17:31:56 +02:00 committed by GitHub
parent ff4ecb86e5
commit da9a3c1897
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,8 @@ from uuid import UUID
from langchain.chains import ConversationalRetrievalChain
from langchain.llms.base import BaseLLM
from langchain.prompts import HumanMessagePromptTemplate, SystemMessagePromptTemplate
from langchain.prompts import (HumanMessagePromptTemplate,
SystemMessagePromptTemplate)
from langchain.retrievers import ContextualCompressionRetriever
from langchain.retrievers.document_compressors import FlashrankRerank
from langchain.schema import format_document
@ -41,7 +42,7 @@ class cited_answer(BaseModelV1):
...,
description="""Description of the thought process, based only on the given sources.
Cite the text as much as possible and give the document name it appears in. In the format : 'Doc_name states : cited_text'. Be the most
procedural as possible.""",
procedural as possible. Write all the steps needed to find the answer until you find it.""",
)
answer: str = FieldV1(
...,