huggingface / huggingface/agents-course
[QUESTION] Ambiguity what chat templates are.
- Dominant language
- MDX
- Stars
- 32.6k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Issue:
Where ➡ https://huggingface.co/learn/agents-course/unit1/messages-and-special-tokens
> This is where chat templates come in. They act as the bridge between conversational messages (user and assistant turns) and the specific formatting requirements of your chosen LLM. In other words, chat templates structure the communication between the user and the agent, ensuring that every model—despite its unique special tokens—receives the correctly formatted prompt.
In my opinion, the first sentence about chat templates is correct. The second part seems wrong.
It says `...chat templates structure the communication between the user and the agent...`.
Correct Sentence:
`...chat templates structure the communication between the agents and the language model or LLM...`.
Reason:
The Chat templates are implemented inside the agents with respective `chat.completion` method to send the user's request, through agents, to the LLMs.
The user just types into the chatbox as similar to how we type messages. The text-flow is as below in it's simplest form is as below:
User's message >> Chat Templates wraps the message as per LLM's specs >> send to LLMs through agents.
So the `the user and the agent` part doesn't seem very right to me. I did give my best alternative, I could thought of. I okay with anything else you come up with.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.