Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current date as context #10

Closed
CybotTM opened this issue Sep 19, 2024 · 3 comments
Closed

Current date as context #10

CybotTM opened this issue Sep 19, 2024 · 3 comments

Comments

@CybotTM
Copy link

CybotTM commented Sep 19, 2024

Hi,

is there any way to autom. give the current date as context?

image

spantaleev added a commit to spantaleev/matrix-docker-ansible-deploy that referenced this issue Sep 22, 2024
…d agents

The playbook did not use to define a prompt for statically-defined
agents.

Since prompt variables support landed in v1.1.0
(see etkecc/baibot@2a5a2d6)
it makes sense to make use of it for a better out-of-the-box experience
(see etkecc/baibot#10).
@spantaleev
Copy link
Contributor

Prompt variables are supported since version 1.1.0.

If you're using matrix-docker-ansible-deploy to deploy the bot, it will now automatically set a prompt which tells the bot its name, model id and current date/time in UTC. See spantaleev/matrix-docker-ansible-deploy@be96be8

The default prompt used by the playbook is also the default prompt recommended during agent creation. It currently looks like this:

You are a brief, but helpful bot called {{ baibot_name }} powered by the {{ baibot_model_id }} model. The date/time now is: {{ baibot_now_utc }}.

The prompt for dynamically-created models (per room or globally) will not be adjusted. If you had created agents without a prompt, you would need to update them (see Updating agents) to include one or you'd need to use the 💬 Text Generation / ⌨️ Prompt Override configuration setting.


Some explanation as to why the default prompt is like this follows.

Passing the bot's name is important sometimes when using the mention (@baibot Hello!) feature in multi-user chats (related to the 💬 Text Generation / 🗟 Prefix Requirement Type configuration). Sometimes we're unable to properly strip the bot's name from the message and the model may see the bot's name anyway. I've sometimes seen the model (Anthropic) get confused as to who "baibot" is, so explicitly telling the model its name should be helpful.

I've also seen users ask the model what kind of model it is and it not knowing or replying incorrectly (gpt-4o saying it's gpt-3.5-turbo), so it's helpful to tell the model what its model id is (as defined in the configuration).

It was intentionally decided to avoid local time and timezones when implementing this feature. It's added complexity and sometimes different bot users would be in different timezones anyway. It was decided that it's better to keep timezone-neutral, but explicitly tell the model that the provided time is in UTC, so it can forward that information to users who ask. Certain models can also calculate local time in different timezones correctly out of the UTC value.

@spantaleev
Copy link
Contributor

Screenshot of the current behavior with the default prompt (in English) and reusing the original question in German:

Screenshot_20240922_122607

@CybotTM
Copy link
Author

CybotTM commented Sep 25, 2024

@spantaleev , great, thank you very much, much appreciated. ♥

venimus pushed a commit to superhero-com/matrix-docker-ansible-deploy that referenced this issue Oct 8, 2024
…d agents

The playbook did not use to define a prompt for statically-defined
agents.

Since prompt variables support landed in v1.1.0
(see etkecc/baibot@2a5a2d6)
it makes sense to make use of it for a better out-of-the-box experience
(see etkecc/baibot#10).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants