We do, but mostly as a fairly nice and fairly well-documented interface for plugging together tools like vector DBs and memory with LLMs.
My feeling is that with the agentic/AutoGPT hype fading and OpenAI adding the functions API there's a lot less value in LangChain's abstractions, at least for production use cases. They're still cool for hacking/toys.
What is the complaint here exactly? That LLMs aren't enforcing database access best practices for you? That's not their job, that's your job. LLMs generate text. You do the rest. Give the LLM a user with the correct access control rules. Add a reasonable timeout to your warehouse/database. Enforce rate limiting like you would with any other endpoint.
No complaint. It's more of a warning about how the main players (OpenAI, LangChain) share notebooks and cookbooks that illustrate how to make the LLMs "query" the databases. At the very least one would expect some language telling people to not do that in production. And it's not unique to SQL, this is just an extreme example.
> At the very least one would expect some language telling people to not do that in production. And it's not unique to SQL, this is just an extreme example.
In professional communication, is it necessary to repeat the obvious all the time? Does an article in a medical journal or a law journal need to explicitly remind its readers of 101 level stuff? If an unqualified person reads the article, misinterprets it because they don’t understand the basics of the discipline, and causes some harm as a result-how is that the responsibility of the authors of the article? Why should software engineering be any different?
> In professional communication, is it necessary to repeat the obvious all the time?
Based on the “repeat” dev articles I’ve seen on HN over the many years and the “repeat” mistakes replicated in the actual workplace, I think it is necessary.
> Why should software engineering be any different?
I don’t think it is. But also see my point below.
I understand the example you were trying to use but it wasn’t very effective. Dev blogs are not equivalent to medical or law journals in many ways that I don’t need to list. Academic computer science white papers are a bit closer.
Thinking about this more, in my experience and across multiple fields, I always see a phenomenon where either colleagues/classmates/whoever reference a _popular_ but _problematic_ resource which leads to a shitshow.
> Dev blogs are not equivalent to medical or law journals in many ways that I don’t need to list. Academic computer science white papers are a bit closer.
Okay, there are law blogs and medicine blogs too, which are directly comparable to dev blogs. And by that I mean blogs targeted at legal and medical professionals, not blogs on those topics targeted at consumers. For example, BMJ's Frontline Gastroenterology blog [0], whose target audience is practicing and trainee gastroenterologists, and its authors write for their target audience – it is public and anyone can read it, but I don't think the authors spend too much time worrying "what if an unqualified person reads this and misinterprets it due to a lack of basic medical knowledge?"
Or similarly, consider Opinio Juris, the most popular international law blog on the Internet. When a blog post contains the sentence "As most readers will know, lex specialis was created by the International Court of Justice in the Nuclear Weapons Case, to try to explain the relationship between international humanitarian law (IHL) and international human rights law (IHRL)", [1] you know you are not reading something aimed at a general audience.
> but I don't think the authors spend too much time worrying "what if an unqualified person reads this and misinterprets it due to a lack of basic medical knowledge?"
1) You don’t sound too sure about this. Your previous comment sounded like speculation also. Do you actually read these blogs and/or journals?
2) Again, you’re making comparisons that aren’t equivalent. Your argument fails when you replace “unqualified person” with “unqualified target person”. My pizza delivery driver is not reading dev blogs. The junior and senior engineers on my team over the years who passed 5 rounds of interviews yet still make simple but devastating mistakes are reading these blogs.
> lex specialis
1) In your previous comment, you said that medical and law journals _don’t_ explain every basic little thing. And now you provided a quote where the law blog is explicitly explaining a very basic thing even to their _qualified target audience_. If “most readers” already know something, then what’s the point of re-explaining it? You’re proving my point instead.
2) Another comparison that isn’t equivalent. Even if an “unqualified” person were to read a _professional_ law or medical blog/journal, what’s the worst that could happen? Nothing.
The answer to that question above will definitely change if we’re talking about _nonprofessional_ content (e.g. TikTok law and medical advice). Frankly, more dev blogs veer towards the “unprofessional” side than “professional”.
I also am very interested in law. I actually applied to law school once, but didn't get in, and gave up on the idea after that. If they'd accepted me, I might have been a lawyer right now rather than a software engineer. Public international law was always an area of particular fascination for me. I remember being at university, and I was supposed to be at my CS lecture, but instead I was in the library reading books like Restatement (Third) of the Foreign Relations Law of the United States and some textbook (I forget its name now) I found on the EU treaties and ECJ case law. So yes, I do read law blogs sometimes. I went through a period when I was reading SCOTUSblog a lot. Not a blog, but I actually enjoy reading stuff like this: https://legal.un.org/ilc/texts/instruments/english/draft_art...
> And now you provided a quote where the law blog is explicitly explaining a very basic thing even to their _qualified target audience_. If “most readers” already know something, then what’s the point of re-explaining it? You’re proving my point instead.
Even that quoted sentence is assuming the reader already knows what "international humanitarian law" and "international human rights law" are, and what is the difference between them. There are also many cases in that post in which (unlike lex specialis) the author uses technical legal terminology without ever explaining it: for example, his repeated invocation of jus ad bellum, or his mention of the "Inter-American System". Another example is where he cites the Vienna Convention on the Law of Treaties, which assumes the reader understands its significance.
> Even if an “unqualified” person were to read a _professional_ law or medical blog/journal, what’s the worst that could happen? Nothing.
For a medical journal – a person reads an article about using drug X to treat condition Y. They then proceed to misdiagnose themselves with condition Y, and then somehow acquire drug X without having been prescribed it, and start taking it. A person could cause quite serious medical harm to themselves in this way. Reading medical journals can also contribute to the development of illness anxiety disorder – you don't need to be a medical student to develop medical student's disease.
For a law journal - a criminal defendant reads something in a law journal and thinks it helps their case. Their lawyer tries to explain to them that they are misunderstanding it and it isn't actually relevant to their situation, but they refuse to listen. They fire their lawyer and then try to argue in court based on that misunderstanding. It is easy to see how they could end up with a significantly worse outcome as a result, maybe even many extra years in prison.
Conversely, our 10 year old sometimes write Python programs. They aren't anything special, but better than I could do at his age. I bet you his Python programs are full of security holes and nasty bugs and bad practices. Who cares, what possible harm could result? And he isn't at the stage yet of reading development blogs, but I've seen him before copying code off random websites he found, so maybe he has stumbled on to one of them. My brother is a (trainee) oncologist, but he did an introductory programming course as an undergrad, and he wrote some Python programs in that too, although he hasn't done any programming in years–what harm could have his programs done? If he started trying to modify the software in one of the radiation therapy machines, I'd be worried (but he's too responsible for that); if he decided to try writing a game in Python for fun, why should anyone worry, no matter what the quality of his code is?
Maybe "complaint" was the wrong word but I disagree with the conclusion that LLMs are "not for trustworthy production systems" for the reasons I stated.
Full disclosure, I wrote a blog post called "Text to SQL in Production." Maybe I should add a follow-up covering our guardrails. I agree that they are necessary.
Everyone in this space seems to be building on the LSP and classic auto-complete in particular as their UI. But I've found this to be non ideal.
- As mentioned in this paper I definitely do not want the AI suggestion crowding out a suggestion generated directly from the type bindings
- I often do want the AI to write an entirely new block of boilerplate. To do this you have to write a comment string targeted at the AI, then delete this afterwards
- Sometimes I'd just like the AI to explain to me what some code does without writing anything
- This isn't something I always want on; I find myself turning the plugin on and off depending on the context
Overall I think we need a novel UX to really unlock the AI's helpfulness
I have been enjoying a chat based AI coding modality. I built some tooling that gets rid of the need to cut & paste code between the chat and your files. This makes chatting about code changes much more ergonomic. My tool also integrates directly with git, which provides a safety net. It’s easy to undo changes if the AI does something silly.
Here are some chat transcripts that give a flavor of what it’s like to code with AI this way:
Very cool. I’ve been using ChatGPT quite manually for similar effect here, though I’m often using it for fragments of code less than whole projects/files, given I’m often dealing with an existing codebase.
This echoes my sentiment exactly. My biggest gripe is when type suggestions are replaced with AI suggestions, as I more often just want to auto-complete a method/attribute. I frequently find myself toggling AI suggestions via hotkey.
As for the getting a suggestion by writing comments, an "insert from prompt" action perhaps, or just a separate prompt pane/popup/whatever-you-prefer combined with using good ol' copy+paste would suffice.
If you want to know what some code does, just select it & hit a keyboard shortcut (or right click and choose explain from menu).
If you want AI to write code for you, write a comment starting with a specific word, it suggests the implementation and you can choose to accept & replace the comment with it.
All of these things are pretty much exactly what GitHub Copilot chat does.
You can select code and ask it to explain it to you, or ask it to generate some boilerplate / code and then insert it at your cursor position without adding any comments like you described for prompting the Copilot autocomplete.
It seems okay, but I don't really use vscode that much
In vscode the Genie extension does these things and you can provide your own contextual hooks with custom prompts. It’s particularly good at explaining syntax and semantic errors.
We use Contracts too and are in the process of transitioning to Sorbet. In addition to the same runtime type checking as Contracts, Sorbet offers static type checking (and will re-use your runtime signatures in its static analysis).
My feeling is that with the agentic/AutoGPT hype fading and OpenAI adding the functions API there's a lot less value in LangChain's abstractions, at least for production use cases. They're still cool for hacking/toys.