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

How to solve URL and probably other hallucinations? #9

Open
PieBru opened this issue Oct 15, 2024 · 3 comments
Open

How to solve URL and probably other hallucinations? #9

PieBru opened this issue Oct 15, 2024 · 3 comments

Comments

@PieBru
Copy link

PieBru commented Oct 15, 2024

Hi J,
just tryed AutoGroqAgent Chat, it doesn't solve URL hallucinations.

This is my query:

Search the medical domain for authoritative Systematic Reviews or Meta-Analysis of Randomized Controlled Trials, that prove the efficacy of "Saw Palmetto" (Serenoa repens) in improving BPH.

Exclude: 
  1) commercial or biased sites;
  2) publications dated before 2019.
  2) publications with PubMed impact Factor less than 4.
  
Rank the remaining publications by impact factor and list only the top 5 publications.
Give the public links to the listed publications only if the URL points to the correct corresponding publication.

Any hint?
Thank you from Italy.
Piero

Edit: forgot to mention I checked "Double check".

@jgravelle
Copy link
Owner

Be sure to set the temperature to 0 and try different models. If you pull down the full repo, you can also bump up the retries from 5 to 50.

Buona fortuna, amico mio...!

@PieBru
Copy link
Author

PieBru commented Oct 15, 2024

Sorry to bother you, but I'm not fluent in Python.
After modifying test.py:

def test_autonomous_agent():
    print("\nTesting Autonomous Agent...")
    agent = AutonomousAgent(groq, max_sources=50)  # Limit to 3 sources for faster testing
    
    request = """
Search the medical domain for authoritative Systematic Reviews or Meta-Analysis of Randomized Controlled Trials, that prove the efficacy of "Saw Palmetto" (Serenoa repens) in improving BPH.

Exclude: 
  1) commercial or biased sites;
  2) publications dated before 2019.
  2) publications with PubMed impact Factor less than 4.
  
Rank the remaining publications by impact factor and list only the top 5 publications.
Give the public links to the listed publications only if the URL points to the correct corresponding publication.
"""
    response = agent.process_request(request) 
...

... choice 25 doesn't look at 50 sources and ends as before:

Response is satisfactory: False
Assertion Error: The autonomous agent should provide a satisfactory response

Btw, my profile picture is from 25 years ago, so please help ;)
Piero

@jgravelle
Copy link
Owner

For this we're going to need PocketGroq's chain-of-thought mechanism to call our new autonomous agent rather than going the more generic '.generate' route. That's where we're headed, but we're not there yet...

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