-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: replace verifier with retriever #26
Conversation
94c033b
to
d04308a
Compare
botocore.errorfactory.ModelErrorException: An error occurred (ModelErrorException) when calling the Converse operation: The system encountered an unexpected error during processing. Try your request again.
It's more consistent to other agents
d04308a
to
31b0053
Compare
This reverts commit 174aca9.
964dbdb
to
d29ed05
Compare
alumnium/alumni.py
Outdated
""" | ||
Checks a given statement using the verifier. | ||
|
||
Args: | ||
statement: The statement to be checked. | ||
vision: A flag indicating whether to use a vision-based verification via a screenshot. Defaults to False. | ||
retries: The number of retries to check the statement. Defaults to the value set in the LoadingDetectorAgent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p0deje hm, there is no LoadingDetectorAgent
anymore, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove
alumnium/__init__.py
Outdated
logger = logging.getLogger(__name__) | ||
|
||
level = getenv("ALUMNIUM_LOG_LEVEL", None) | ||
if getenv("ALUMNIUM_DEBUG", "0") == "1": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it kept for backward compatibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, I can remove it if you think it's unuseful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be more confusing than helpful.
I imagine the situation when ALUMNIUM_DEBUG=1
and ALUMNIUM_LOG_LEVEL=info
. If I look at them in the .env
file, I can forget which one gets a priority
`ALUMNIUM_LOG_LEVEL=debug` should be used instead
It looks like it's not so useful as long as we use CoT in the retriever agent structured output (explanation string BEFORE value string)
What started initially as an attempt to implement 2-pass verification to increase its stability ended up being a complete replacement of
verifier/confirmation_checker
withretriever/extractor
agents. For now it seems to work good enough, though I would like to further improve the implementations by utilizing chain-of-thought approach for structured outputs. This can be done in follow-up PRs.Overall, the new design for verification is to:
true/false
output of the retriever result.Smaller additions in this PR:
ALUMNIUM_LOG_LEVEL
which compliments existingALUMNIUM_DEBUG
.<sep
to%SEP%
because Haiku treats the former as opening HTML tag and likes to append the closing tag (e.g.<sep>FOO</sep>
).