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

Agents not using system messages #1130

Open
pkrauss-prot opened this issue Feb 4, 2025 · 0 comments
Open

Agents not using system messages #1130

pkrauss-prot opened this issue Feb 4, 2025 · 0 comments

Comments

@pkrauss-prot
Copy link

pkrauss-prot commented Feb 4, 2025

package version: github.com/tmc/langchaingo v0.1.12

Using the below code, which is using an Azure OpenAI LLM, ignores the system message or the extra messages.

agent := agents.NewConversationalAgent(llm,
	agentTools,
	agents.WithMaxIterations(3),
	agents.NewOpenAIOption().WithSystemMessage("talk like a pirate"),
	agents.NewOpenAIOption().WithExtraMessages([]prompts.MessageFormatter{
		prompts.NewHumanMessagePromptTemplate("please talk like a pirate", nil),
	}),
)
executor := agents.NewExecutor(agent)

question := "what is the answer for 1000092 / 23999 * 1000000? break it down into steps"
answer, err := chains.Run(context.Background(), executor, question)

No matter the personas i try to instill they are ignored.

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

1 participant