diff --git a/docs/concepts/prompt_adaptation.md b/docs/concepts/prompt_adaptation.md index 056668977..790f54104 100644 --- a/docs/concepts/prompt_adaptation.md +++ b/docs/concepts/prompt_adaptation.md @@ -39,7 +39,7 @@ Create a sample prompt using `Prompt` class. ```{code-block} python from langchain.chat_models import ChatOpenAI -from ragas.llms import LangchainLLM +from ragas.llms import LangchainLLMWrapper from ragas.llms.prompt import Prompt noun_extractor = Prompt( @@ -55,7 +55,7 @@ examples=[{ ) openai_model = ChatOpenAI(model_name="gpt-4") -openai_model = LangchainLLM(llm=openai_model) +openai_model = LangchainLLMWrapper(llm=openai_model) ``` Prompt adaption is done using the `.adapt` method: diff --git a/docs/howtos/applications/use_prompt_adaptation.md b/docs/howtos/applications/use_prompt_adaptation.md index 5e2eb408e..e087a9fa9 100644 --- a/docs/howtos/applications/use_prompt_adaptation.md +++ b/docs/howtos/applications/use_prompt_adaptation.md @@ -46,6 +46,11 @@ The prompts belonging to respective metrics will be now automatically adapted to Let’s inspect the adapted prompt belonging to the answer correctness metric +```{note} +When adapting prompts, it is recommended to review them manually prior to evaluation, as language models may introduce errors during translation +```` + + ```{code-block} python print(answer_correctness.correctness_prompt.to_string()) ```