Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/concepts/prompt_adaptation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions docs/howtos/applications/use_prompt_adaptation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())
```
Expand Down