Skip to content

Conversation

abeglova
Copy link
Contributor

@abeglova abeglova commented Oct 6, 2025

What are the relevant tickets?

closes https://github.com/mitodl/hq/issues/8770

Description (What does it do?)

#2560 imports csv files as problem set parts . Unfortunately, even with two 1000 line files, I hit the llm token limit while testing the tutor with a problem set that involves csv files. This truncates the output to only show the first few rows of the csv and the column names. Combined with the solution, this seems to be enough for the tutor to be able to answer questions about problems that require data files

How can this be tested?

run docker compose exec web ./manage.py backpopulate_canvas_courses --canvas-ids 34716 (if you don't have it imported already)
Go to http://api.open.odl.local:8065/api/v0/tutor/problems/34716-15.C57_FA25+canvas/Assignment%202/
instead of content the csv files should have truncated_content and number_of_records

The same problem set is also in the test course (14566-kaleba:20211202+canvas) as "15.C57 FA25 - Assignment 2"

@abeglova abeglova marked this pull request as ready for review October 6, 2025 20:03
Copy link
Member

@mbertrand mbertrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming the changed attribute names don't break the tutorbot.

@abeglova abeglova force-pushed the ab/csv-files-in-tutor-problems branch from c494769 to 45c010b Compare October 6, 2025 20:28
Base automatically changed from ab/csv-files-in-tutor-problems to main October 6, 2025 20:40
@abeglova abeglova force-pushed the ab/truncate-csv-files-in-tutor-problems branch from fd59275 to 99a538a Compare October 6, 2025 20:41
@abeglova abeglova force-pushed the ab/truncate-csv-files-in-tutor-problems branch from 99a538a to b72f110 Compare October 6, 2025 20:50
@abeglova abeglova merged commit 28402ad into main Oct 6, 2025
10 checks passed
@abeglova abeglova deleted the ab/truncate-csv-files-in-tutor-problems branch October 6, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants