I think people misunderstand LLMs, you should think of them like humans with limited recall capabilities. Seems like the author asked to retrieve a lot of data which it is bound to make mistakes as the training data might contain this but only a lossy representation of it, the better way to think is can it generate some SQL given this dataset and provide answers you were looking for just like how humans would approach this type of problem.
I have been experimenting with USDA food database and sending just the metadata of the table structure to the LLM as a prompt so it can write SQL
My prompt is below
----
You are a SQL Generator for USDA Food Database which is stored in sqlite. When generating SQL make sure to use :parameter_name for queries requiring parameters.
Here is the schema:
{% for row in data %}
Table: {{ row.table_name }}
Columns:
{{ row.columns }}
{% endfor %}
You can generate python code to analyze the data only if user requests it, each python code block should be able to run in Jupyter cell fully self contained. Libraries such as matplotlib, numpy, seaborn are installed. You will get the previously executed sql queries by the user in <context> </context>tags
You can access this executed data from cache
```python
import cache
data = cache.get_data('query_hash')
```
the data in the above example is already a pandas data frame
Wait for the user to ask for questions before generating any queries.
I love Claude 3.5 sonnet and their UI is top notch especially for coding, recently though they have been facing capacity issues especially during weekdays correlating with working hours. Have tried Qwen2.5 coder 32B and it's very good and close to Claude 3.5 in my coding cases.
I have aging parents in India, and I can tell you firsthand—healthcare there is far from cheap. In fact, prices have surged, and many people are now accustomed to the higher costs, thanks to rampant price gouging during the COVID pandemic.
It wrote some code for me - but stopped in the middle
----
Q:
The following are table definitions Users(id, name, username, password, first_name, last_name, last_login_dttm) Pictures(id, user_id, name, date_taken, size) Generate SQL for the following - Who is the top user by number of pictures
A:
Oh fun, a little SQL problem! So let's see here... for this, I'll need to join the tables of Users and Pictures, using the User IDs as the key to link them.
Then, I'll need to perform a GROUP BY on the User IDs, to get the counts of pictures for each user. Finally, I can sort by the count and select the top user. I think the final query should look something like this:
SELECT id, first_name, last_name
FROM Users AS u
INNER JOIN Pictures AS p ON https://u.idd = p.user_
As an early developer (Day 1 of App Store launch in 2008 - iRetroPhone) there is some excitement of being the first on a new platform. Back in 2008, there was very little documentation on UIKit but it was fun to develop. The difference I see this time is we had access to the iPhone(released 2007) and this time[1] it looks like you need to either ask Apple to test the app for you, or go to one of the labs (not in NYC strangely) or be one of the lucky ones to be selected for developer kit.
One more thing I found strange was the current Xcode 15 beta does not even come with Vision OS SDK (coming later this month) and we cant even play with the WWDC session videos in the simulator
I highly recommend the video from karpathy https://www.youtube.com/watch?v=VMj-3S1tku0 - This explains the same idea spelled out in code. It really helped me understand the mathematical expression graph of neural networks. He uses graphviz to show the expressions and initially calculate gradients manually and then implement back propagation.
oauth-idp-server - OAuth 2.0 Identity Provider with third-party support https://github.com/gavi/oauth-idp-server
mcp-pyexec-client - Testing client for end-to-end validation https://github.com/gavi/mcp-pyexec-client