Skip to content

Commit 2eb4a53

Browse files
committed
fix templatye
1 parent d32ff1c commit 2eb4a53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/SmolaAgents/05_prompttemplates.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,20 +231,25 @@ system_prompt: |-
231231
You can use imports in your code, but only from the following list of modules: {{authorized_imports}}
232232
# ... (rest of the prompt) ...
233233
```
234+
235+
{% raw %}
234236
You can see the `{{ tools }}`, `{{ managed_agents }}`, and `{{ authorized_imports }}` placeholders ready to be filled in. The `{%- for ... %}` syntax is Jinja2's way of looping through lists (like the list of tools).
237+
{% endraw %}
235238

236239
## Conclusion
237240

238241
`PromptTemplates` are the unsung heroes that shape the conversation between the agent and its LLM brain. They act like customizable scripts or Mad Libs templates, ensuring the LLM receives clear, consistent instructions filled with the specific details it needs (like the task, available tools, and memory context).
239242

240243
You've learned:
241244

245+
{% raw %}
242246
* Why structured prompts are necessary for guiding LLMs effectively.
243247
* The "Mad Libs" analogy for `PromptTemplates`.
244248
* How Jinja2 is used to fill placeholders like `{{ task }}` and `{{ tools }}`.
245249
* The main types of prompts stored (`system_prompt`, `planning`, `final_answer`).
246250
* That `SmolaAgents` provides sensible default templates, especially the crucial `system_prompt`.
247251
* How the agent automatically renders these templates with current data before sending them to the LLM.
252+
{% endraw %}
248253

249254
Understanding `PromptTemplates` helps you grasp how the agent frames its requests to the LLM. While you might stick to the defaults initially, knowing this mechanism exists opens the door to customizing agent behavior later on.
250255

0 commit comments

Comments
 (0)