[GH-ISSUE #2414] [FEAT]: Support for Sending Training Data and Executing SQL Queries in SQLAgent custom skill. #1569

Closed
opened 2026-02-22 18:25:27 -05:00 by yindo · 1 comment
Owner

Originally created by @avinashkurup on GitHub (Oct 3, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2414

What would you like to see?

Feature Request:

  1. Send Training Data
    Ability to send training data with sample queries and DDLs as a text file after invoking an agent session. Shown in the picture, the query is sent to the LLM but the training data is not uploaded.

  2. Execute SQL Queries
    Ability to run SQL on the read-only DB connection and print the results in the AnythingLLM response.

    Provided some sample training data as a text file in workspace mode and the system analyzed and generated SQL which did not return any results on running on the DB due to misunderstanding the provided name as first and last name.

utilised the uploaded file as training data,
anythingllm-training-data.txt

expected SQL: SELECT observation_date, lab_description, lab_value, lab_units, lab_code
                            FROM master_patient_index.patient_lab_results
                              WHERE first_name = 'Gloria696'
                           ORDER BY observation_date ASC;
                           
erroneous SQL generated: SELECT observation_date, lab_description, lab_value, lab_units, lab_code
                                            FROM master_patient_index.patient_lab_results
                                               WHERE first_name = 'Gloria' AND last_name = '696'
                                            ORDER BY observation_date ASC;

image

Originally created by @avinashkurup on GitHub (Oct 3, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2414 ### What would you like to see? Feature Request: 1. Send Training Data Ability to send training data with sample queries and DDLs as a text file after invoking an agent session. Shown in the picture, the query is sent to the LLM but the training data is not uploaded. 2. Execute SQL Queries Ability to run SQL on the read-only DB connection and print the results in the AnythingLLM response. Provided some sample training data as a text file in workspace mode and the system analyzed and generated SQL which did not return any results on running on the DB due to misunderstanding the provided name as first and last name. utilised the uploaded file as training data, [anythingllm-training-data.txt](https://github.com/user-attachments/files/17244582/anythingllm-training-data.txt) expected SQL: SELECT observation_date, lab_description, lab_value, lab_units, lab_code FROM master_patient_index.patient_lab_results WHERE first_name = 'Gloria696' ORDER BY observation_date ASC; erroneous SQL generated: SELECT observation_date, lab_description, lab_value, lab_units, lab_code FROM master_patient_index.patient_lab_results WHERE first_name = 'Gloria' AND last_name = '696' ORDER BY observation_date ASC; ![image](https://github.com/user-attachments/assets/fa2dddcd-ff20-4907-a6d3-0f1d3e4aaa6a)
yindo added the enhancementfeature request labels 2026-02-22 18:25:27 -05:00
yindo closed this issue 2026-02-22 18:25:27 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 3, 2024):

You could accomplish this via the prompt (system or input) and guiding the output to accomplish this. Adding this functionality specifically for agent would be complex to support, dragging and dropping files into the input embeds them into the workspace for later use. Agents have access to uploaded files so you could directly the agent to refer to that file first and then run SQL and a model should be able to reason about both.

@timothycarambat commented on GitHub (Oct 3, 2024): You could accomplish this via the prompt (system or input) and guiding the output to accomplish this. Adding this functionality specifically for agent would be complex to support, dragging and dropping files into the input embeds them into the workspace for later use. Agents have access to uploaded files so you could directly the agent to refer to that file first and then run SQL and a model should be able to reason about both.
yindo changed title from [FEAT]: Support for Sending Training Data and Executing SQL Queries in SQLAgent custom skill. to [GH-ISSUE #2414] [FEAT]: Support for Sending Training Data and Executing SQL Queries in SQLAgent custom skill. 2026-06-05 14:41:28 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1569