-
Notifications
You must be signed in to change notification settings - Fork 372
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
AI 128k context would allow us to send few-shots prompts #657
Comments
Good idea. I'm planning on doing a v2 of the assistant that will incorporate some features like this. For the few-shot, would you want to always include the same handful of queries every time you use the assitant, or a UI to quckly select an example to query to send, which would vary from request to request? How would you like to see it work? i'd love to add this. |
Would you use e.g. Openrouter to send things to Llama 3.1? What kind of abstraction would be useful to allow you to plug in the LLM of your choice? Openrouter seems to make a lot of sense to me (and is drop-in compatible with the openai SDK) but definitely would like to learn more. |
Yes, I was thinking of a UI. Currently, we can select some columns (the effect of this is unclear to me). But something similar, would be helpful, to give the AI a sense of which are the relationships available in the DB (not only schema, but practical examples.)
Yes, I'm using OpenRouter. But some of the alternatives (Groq, fireworks, glhf.chat, etc.) are in sight too. As for the abstraction, I'm not sure that I understand. I was just thinking of giving some examples, and see if I get anything that really runs... so far, my experience with it was rather poor. But that's probably on the schema we are using at work. Many column names are a bit ambiguous and there's a lot of bioinformatic specific terms here. |
It's actually selecting a table. If selected, the schema of the table, as well as 10 random sample rows, will get send to the LLM as additional context. Basically, if you are prompting "write a query showing me sales from the last 10 days" -- and there's nothing to go on in the current query window, you can select the tables you would like the LLM to consider. If there is already a query in the SQL editor, then a parser will extract any tables in the query and do the same thing (extract schema and sample rows and add them to the prompt). If you have SQL editor content, you add additional tables via the checkboxes. I'm thinking I'll add two-ish features:
|
Great, I will give it a spin and come back to you, probably tomorrow. |
right on. Let me know if you'd like me to cut a beta release onto pypi or something, or if you are comfortable installing from source. I really do think it's going to work much better, if you but a few minutes of time into adding some annotations, and marking a few example queries. Look forward to hearing! |
I am having some difficulty with the UI... it's empty (the assistant panel only, I am able to run queries and everything else). The web browser's network panel revealed a 404 for this file/ url: |
Nevermind. Something was wrong from my side. I just re-run the installation from the top, and now collectstatic did copy some files.. :) |
The UI still seems off... I don't get the new elements. I have added |
I think you are looking at master. I haven’t merged the changes. Please
pull down the code from the branch assistant-3
…On Wed, Aug 28, 2024 at 6:28 AM A.s. ***@***.***> wrote:
image.png (view on web)
<https://github.com/user-attachments/assets/5cc784f4-c9d2-4b33-90d0-384bc5ba770a>
—
Reply to this email directly, view it on GitHub
<#657 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFJLRG2BYKACM5PK3Z3G4TZTWQ6JAVCNFSM6AAAAABL76WOLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJUHEZTKMRQGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yeah... I'm back to getting 404 on This is the last output I got while installing and activating the app...
|
For simplicity, I cut a 5.3 beta release. Please try with that: https://pypi.org/project/django-sql-explorer/5.3b1/ Should "just work". |
Great, that worked fine. The new beta looks even more powerful! Regarding the "assistant examples" checkbox, it's a bit misplaced, since it's after the data and that's too far away from the assistant UI. And it's not really clear how it works (I understood it after reading the merged PR description). In any case, I think the whole design could do better if we get the examples as suggestions (e.g. via the tables that are in common to old queries, specially those that were marked as favorites). I think a button to pop new UI where you have the history, and add or remove all queries would be nice to use those suggested examples for few-shot prompting. OTOH, I noticed two details on the UI that could improve:
|
This is incredible feedback - thank you! I will respond in more detail later today, and work on some of this for a beta 2 this weekend. Cheers! p.s. The "trash" icon should remove all selected tables. Was that 1) Unclear or 2) Not working? I agree that that UI is not super obvious. |
Oh, I wasn't clear. The trash icon did work, and then I went with copy and pasting the query again to get the auto-detection which is just great. The confusing part was the "+" sign adding every table when I wanted to just get pop-up UI or something like the thing we get when placing the cursor in the text area of these. p.s. Glad to provide feedback, this is an amazing app! 🥇 |
Great, those changes indeed look neat! I will give beta2 a spin, (and come back if there're any serious issues that I deem relevant.) Thanks a lot :) |
5.3b2 is released! |
I'd like to send some of my saved queries (optionally, with their results) to the AI assistant, to give some examples accompanying the question. I believe this would greatly improve its answer...
PS. Llama 3.1 has a 128k context, and would be suitable for this.
The text was updated successfully, but these errors were encountered: