Fix spelling typos in learned_prompt_optimization.ipynb (#11862)

This patch fixes some spelling typo in
learned_prompt_optimization.ipynb.
It only changed messages, no logic changed.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
pull/11789/head
standby24x7 12 months ago committed by GitHub
parent e669f9d731
commit 40d188948e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,7 +57,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Intialize the RL chain with provided defaults\n",
"##### Initialize the RL chain with provided defaults\n",
"\n",
"The prompt template which will be used to query the LLM needs to be defined.\n",
"It can be anything, but here `{meal}` is being used and is going to be replaced by one of the meals above, the RL chain will try to pick and inject the best meal\n"
@ -212,7 +212,7 @@
"\n",
"It's important to note that while the RL model can make sophisticated selections, it doesn't inherently recognize concepts like \"vegetarian\" or understand that \"beef enchiladas\" aren't vegetarian-friendly. Instead, it leverages the LLM to ground its choices in common sense.\n",
"\n",
"The way the chain is learning that Tom prefers veggetarian meals is via an AutoSelectionScorer that is built into the chain. The scorer will call the LLM again and ask it to evaluate the selection (`ToSelectFrom`) using the information wrapped in (`BasedOn`).\n",
"The way the chain is learning that Tom prefers vegetarian meals is via an AutoSelectionScorer that is built into the chain. The scorer will call the LLM again and ask it to evaluate the selection (`ToSelectFrom`) using the information wrapped in (`BasedOn`).\n",
"\n",
"You can set `set_debug(True)` if you want to see the details of the auto-scorer, but you can also define the scoring prompt yourself."
]
@ -286,7 +286,7 @@
" print(event.to_select_from)\n",
"\n",
" # you can build a complex scoring function here\n",
" # it is prefereable that the score ranges between 0 and 1 but it is not enforced\n",
" # it is preferable that the score ranges between 0 and 1 but it is not enforced\n",
"\n",
" selected_meal = event.to_select_from[\"meal\"][event.selected.index]\n",
" print(f\"selected meal: {selected_meal}\")\n",
@ -617,7 +617,7 @@
"\n",
"### other advanced featurization options\n",
"\n",
"Explictly numerical features can be provided with a colon separator:\n",
"Explicitly numerical features can be provided with a colon separator:\n",
"`age = rl_chain.BasedOn(\"age:32\")`\n",
"\n",
"`ToSelectFrom` can be a bit more complex if the scenario demands it, instead of being a list of strings it can be:\n",
@ -672,7 +672,7 @@
"\n",
"```\n",
"\n",
"Internally the AutoSelectionScorer adjusted the scoring prompt to make sure that the llm scoring retured a single float.\n",
"Internally the AutoSelectionScorer adjusted the scoring prompt to make sure that the llm scoring returned a single float.\n",
"\n",
"However, if needed, a FULL scoring prompt can also be provided:\n"
]
@ -730,7 +730,7 @@
"\u001b[32;1m\u001b[1;3m[llm/start]\u001b[0m \u001b[1m[1:chain:LLMChain > 2:llm:OpenAI] Entering LLM run with input:\n",
"\u001b[0m{\n",
" \"prompts\": [\n",
" \"Given ['Vegetarian', 'regular dairy is ok'] rank how good or bad this selection is ['Beef Enchiladas with Feta cheese. Mexican-Greek fusion', 'Chicken Flatbreads with red sauce. Italian-Mexican fusion', 'Veggie sweet potato quesadillas with vegan cheese', 'One-Pan Tortelonni bake with peppers and onions']\\n\\nIMPORANT: you MUST return a single number between -1 and 1, -1 being bad, 1 being good\"\n",
" \"Given ['Vegetarian', 'regular dairy is ok'] rank how good or bad this selection is ['Beef Enchiladas with Feta cheese. Mexican-Greek fusion', 'Chicken Flatbreads with red sauce. Italian-Mexican fusion', 'Veggie sweet potato quesadillas with vegan cheese', 'One-Pan Tortelonni bake with peppers and onions']\\n\\nIMPORTANT: you MUST return a single number between -1 and 1, -1 being bad, 1 being good\"\n",
" ]\n",
"}\n",
"\u001b[36;1m\u001b[1;3m[llm/end]\u001b[0m \u001b[1m[1:chain:LLMChain > 2:llm:OpenAI] [274ms] Exiting LLM run with output:\n",
@ -786,7 +786,7 @@
"\n",
"Given {preference} rank how good or bad this selection is {meal}\n",
"\n",
"IMPORANT: you MUST return a single number between -1 and 1, -1 being bad, 1 being good\n",
"IMPORTANT: you MUST return a single number between -1 and 1, -1 being bad, 1 being good\n",
"\n",
"\"\"\"\n",
"\n",

Loading…
Cancel
Save