897 karma · joined August 26, 2022
Consider a python function signature
list_containers(show_stopped: bool = False, name_pattern: Optional[str] = None, sort: Literal["size", "name", "started_at"] = "name"). It doesn't even need docs
Now convert this to JSON schema which is 4x larger input already.
And when generating output, the LLM will generate almost 2x more tokens too, because JSON. Easier to get confused.
And consider that the flow of calling python functions and using their output to call other tools etc... is seen 1000x more times in their fine tuning data, whereas JSON tool calling flows are rare and practically only exist in instruction tuning phase. Then I am sure instruction tuning also contains even more complex code examples where model has to execute complex logic.
Then theres the whole issue of composition. To my knowledge there's no way LLM can do this in one response.
vehicle = call_func_1()
if vehicle.type == "car":
details = lookup_car(vehicle.reg_no)
else if vehicle.type == "motorcycle":
details = lookup_motorcycle(vehicle.reg_ni)
How is JSON tool calling going to solve this?Personally I am convinced JSON is a bad format for LLMs and code orchestration in python-ish DSL is the future. But local models are pretty bad at code gen too.
There's also `typer` from the creator of `fastapi` which relies on type annotations. I have not had the opportunity to use it.
But that's not the point. If every dependency follows same philosophy, costs (compiler time, binary size, dependency supply chain) will add up very quickly.
Not to mention, in big organizations, you have to track each 3rd party and transitive dependency you add to the codebase (for very good reasons).
If it improves compile time, that sounds like a bug in the compiler or the design of the language itself.
What sold me on debugger is the things you can do with it
* See values and eval expressions in calling frames.
* Modify the course of execution by eval'ing a mutating expression.
* Set exception breakpoints which stop deep where the exception is raised.
One other such tool is REPL. I see REPL and debugger as complementary to each other, and have some success using both together in VSCode, which is pretty convenient with autoreload set. (https://mahesh-hegde.github.io/posts/vscode-ipython-debuggin...)The only argument is that it improves the style of writing.
But I am in an ESL environment and no one cares about that.
Even otherwise why would anyone want to read a decompressed version instead of the "prompt" itself?
## Instructions
* Be concise
* Use simple sentences. But feel free to use technical jargon.
* Do NOT overexplain basic concepts. Assume the user is technically proficient.
* AVOID flattering, corporate-ish or marketing language. Maintain a neutral viewpoint.
* AVOID vague and / or generic claims which may seem correct but are not substantiated by the the context.
Cannot completely avoid hallucinations and it's good to avoid AI for text that's used for human-to-human communication. But this makes AI answers to coding and technical questions easier to read.This has been my experience as well. to always run the cli tool in the bottom pane of an IDE and not in a standalone terminal.
On the flip side, you can't have exception breakpoints in Go.
It's been a very useful tool to test out and prototype using various LLM features like multimodal, schema output and now tools as well! I specifically like that I can just write a python function with type annotations and plug it to the LLM.
They're good at coming up with new code.
Give it function signature with types and it will give pretty good implementation.
Tell it to edit something, and it will lose track.
The write-lint-fix workflow with LLMs doesn't work for me - LLM is monkey brain edits unrelated parts of code.
Without proper understanding of CS, this is what we get. Lack of rigour.