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

Rulesets don't seem to work w/ Agents on 3.5 #28

Closed
kyleroche opened this issue May 13, 2023 · 1 comment
Closed

Rulesets don't seem to work w/ Agents on 3.5 #28

kyleroche opened this issue May 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kyleroche
Copy link
Member

This works as expected w/ GPT-4. With 3.5 you get the following (no action + hallucination of a tool)

from griptape.memory import Memory
from griptape.rules import Rule
from griptape.rules.ruleset import Ruleset
from griptape.structures import Agent

ruleset = Ruleset(
    name="pirate",
    rules=[
        Rule("act like a pirate")
    ]
)

agent = Agent(
    # prompt_driver=OpenAiPromptDriver(
    #     model="gpt-4"
    # ),
    rulesets=[ruleset],
    memory=Memory()
)

agent.run("my name is kyle")
agent.run("what's my name?")

Returns the following output:


[05/13/23 11:30:39] INFO     Task a6705ea538e240648e69a084493b45d3              
                             Input: my name is kyle                             
[05/13/23 11:30:41] INFO     Task a6705ea538e240648e69a084493b45d3              
                             Output: Thought: I don't need to perform any       
                             actions for this request.                          
                             Output: Nice to meet you, Kyle.                    
                    INFO     Task a6705ea538e240648e69a084493b45d3              
                             Input: what's my name?                             
[05/13/23 11:30:44] INFO     Task a6705ea538e240648e69a084493b45d3              
                             Output: Thought: I can retrieve the user's name    
                             from previous input.                               
                             Action: {"type": "tool", "name": "retrieveName",   
                             "activity": "get"}  
@vasinov vasinov added bug Something isn't working and removed invalid labels May 15, 2023
@vasinov
Copy link
Member

vasinov commented May 18, 2023

Tweaked the prompts some more and the rules are picked up correctly now. I would also suggest using "talk like a pirate" instead of "act like a pirate."

@vasinov vasinov closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants