Skip to content

Commit 68eebea

Browse files
authored
docs: Move tutorials out of experimental (#2235)
1 parent 6208733 commit 68eebea

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

β€Ždocs/experimental/tutorials/agent.mdβ€Ž renamed to β€Ždocs/tutorials/agent.mdβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ from ragas import experiment
6060

6161
@experiment()
6262
async def run_experiment(row):
63-
question = row["question"]
64-
expected_answer = row["answer"]
63+
expression = row["expression"]
64+
expected_result = row["expected"]
6565

6666
# Get the model's prediction
67-
prediction = math_agent.solve(question)
67+
prediction = math_agent.solve(expression)
6868

6969
# Calculate the correctness metric
70-
correctness = correctness_metric.score(prediction=prediction.get("result"), actual=expected_answer)
70+
correctness = correctness_metric.score(prediction=prediction.get("result"), actual=expected_result)
7171

7272
return {
73-
"question": question,
74-
"expected_answer": expected_answer,
73+
"expression": expression,
74+
"expected_result": expected_result,
7575
"prediction": prediction.get("result"),
7676
"log_file": prediction.get("log_file"),
7777
"correctness": correctness.value

β€Ždocs/experimental/tutorials/index.mdβ€Ž renamed to β€Ždocs/tutorials/index.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Install ragas_examples
66

77
```bash
8-
pip install ragas_experimental[examples]
8+
pip install ragas[examples]
99
```
1010
2. Setup your OpenAI API key
1111

β€Ždocs/experimental/tutorials/prompt.mdβ€Ž renamed to β€Ždocs/tutorials/prompt.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We will start by testing a simple prompt that classifies movie reviews as positi
1414
First, make sure you have installed ragas examples and setup your OpenAI API key:
1515

1616
```bash
17-
pip install ragas_experimental[examples]
17+
pip install ragas[examples]
1818
export OPENAI_API_KEY = "your_openai_api_key"
1919
```
2020

@@ -69,7 +69,7 @@ async def run_experiment(row):
6969
experiment_view = {
7070
**row,
7171
"response":response,
72-
"score":score.result,
72+
"score":score.value,
7373
}
7474
return experiment_view
7575
```
@@ -92,7 +92,7 @@ async def run_experiment(row, model):
9292
experiment_view = {
9393
**row,
9494
"response": response,
95-
"score": score.result,
95+
"score": score.value,
9696
}
9797
return experiment_view
9898

β€Ždocs/experimental/tutorials/rag.mdβ€Ž renamed to β€Ždocs/tutorials/rag.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import pandas as pd
2828

2929
samples = [
3030
{"query": "What is Ragas 0.3?", "grading_notes": "- Ragas 0.3 is a library for evaluating LLM applications."},
31-
{"query": "How to install Ragas?", "grading_notes": "- install from source - install from pip using ragas_experimental"},
31+
{"query": "How to install Ragas?", "grading_notes": "- install from source - install from pip using ragas[examples]"},
3232
{"query": "What are the main features of Ragas?", "grading_notes": "organised around - experiments - datasets - metrics."}
3333
]
3434
pd.DataFrame(samples).to_csv("datasets/test_dataset.csv", index=False)
@@ -50,7 +50,7 @@ Next, we will write the experiment loop that will run our RAG system on the test
5050
```python
5151
@experiment()
5252
async def run_experiment(row):
53-
response = rag_client.query(row["question"])
53+
response = rag_client.query(row["query"])
5454

5555
score = my_metric.score(
5656
llm=llm,
File renamed without changes.

0 commit comments

Comments
Β (0)