Skip to content

Commit

Permalink
Merge pull request #97 from aymeric-roucher/main
Browse files Browse the repository at this point in the history
Fix a link with updated notebook name
  • Loading branch information
aymeric-roucher committed May 22, 2024
2 parents e133256 + bcad2b0 commit ed79a8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
31 changes: 9 additions & 22 deletions notebooks/en/agents.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
]
}
],
"outputs": [],
"source": [
"!pip install datasets huggingface_hub langchain sentence-transformers faiss-cpu serpapi google-search-results -q"
]
Expand Down Expand Up @@ -316,16 +306,6 @@
"### Run the agent!"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"%reload_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 38,
Expand Down Expand Up @@ -375,6 +355,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"What happened here? First, the agent launched the retriever with specific sources in mind (`['transformers', 'blog']`).\n",
"\n",
"But this retrieval did not yield enough results ⇒ no problem! The agent could iterate on previous results, so it just re-ran its retrieval with less restrictive search parameters.\n",
"Thus the research was successful!\n",
"\n",
"Note that **using an LLM agent** that calls a retriever as a tool and can dynamically modify the query and other retrieval parameters **is a more general formulation of RAG**, which also covers many RAG improvement techniques like iterative query refinement.\n",
"\n",
"## 3. 💻 Debugging Python code\n",
"Since the ReactCodeAgent has an built int Python code interpreter, we can use it to debug our faulty Python script!"
]
Expand Down
4 changes: 2 additions & 2 deletions notebooks/en/llm_judge.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,9 @@
"\"\"\"\n",
"```\n",
"\n",
"**Implement with constrained generation:**\n",
"**Implement with structured generation:**\n",
"\n",
"With constrained generation, you can configure the LLM judge to directly provide its output as a JSON with fields `Evaluation` and `Total rating`, which makes parsing easier : see our [constrained generation](constrained_generation) cookbook to learn more!\n",
"Using **structured generation**, you can configure the LLM judge to directly provide its output as a JSON with fields `Evaluation` and `Total rating`, which makes parsing easier : see our [structured generation](structured_generation) cookbook to learn more!\n",
"\n",
"## Conclusion\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/en/structured_generation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pprompting the model\n",
"## Prompting the model\n",
"\n",
"To get structured outputs from your model, you can simply prompt a powerful enough models with appropriate guidelines, and it should work directly... most of the time.\n",
"\n",
Expand Down

0 comments on commit ed79a8d

Please sign in to comment.