-
Notifications
You must be signed in to change notification settings - Fork 2
Enhancements to RAG evaluation command #320
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
Conversation
82c0082
to
2d6c16a
Compare
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.
Changes look good. It might be worth updating the readme with the new options
Also I was seeing this error show up a few times when running the eval for the tutorbot ( although the evaluation seemed to complete). wasnt sure if its expected:
[2025-09-29 18:12:07] ERROR 103 [ai_chatbots.chatbots] chatbots.py:642 - [fc0e0f7bf0a2] - Error running AI agent
Traceback (most recent call last):
File "/src/ai_chatbots/chatbots.py", line 636, in get_completion
await create_tutorbot_output_and_checkpoints(
self.thread_id, json_output, self.edx_module_id
)
File "/opt/venv/lib/python3.13/site-packages/asgiref/sync.py", line 468, in __call__
ret = await asyncio.shield(exec_coro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.13/site-packages/asgiref/current_thread_executor.py", line 40, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/venv/lib/python3.13/site-packages/channels/db.py", line 13, in thread_handler
return super().thread_handler(loop, *args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.13/site-packages/asgiref/sync.py", line 522, in thread_handler
return func(*args, **kwargs)
File "/src/ai_chatbots/api.py", line 617, in create_tutorbot_output_and_checkpoints
session=UserChatSession.objects.get(thread_id=thread_id),
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.13/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.13/site-packages/django/db/models/query.py", line 637, in get
raise self.model.DoesNotExist(
"%s matching query does not exist." % self.model._meta.object_name
)
ai_chatbots.models.UserChatSession.DoesNotExist: UserChatSession matching query does not exist.
ec7395e
to
9fedf47
Compare
Good catch on the exception, I hadn't tested the tutorbot evaluation. This was caused by bypassing the TutorbotConsumer class which creates a DjangoCheckpointer that typically creates the Also updated the README. |
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.
👍 LGTM
9fedf47
to
a07b9c4
Compare
What are the relevant tickets?
Related to https://github.com/mitodl/hq/issues/7605
Description (What does it do?)
rag_evaluation
management command:How can this be tested?
Run the mgmt command and try out some of the new options, for example: