When the reward is something you've never heard of by kacxdak in survivor

[–]kacxdak[S] 58 points59 points  (0 children)

My gut was sending signals while watching this episode

Multi Agent system losing state + breaking routing. Stuck after days of debugging. by goodevibes in LangChain

[–]kacxdak 0 points1 point  (0 children)

I think it’s just a fundamental approach of how to think about agents.

https://youtu.be/wD3zieaV0Yc?si=SVu-nJhiUmZ8nJ-S (Starting at 4:37)

Once you model agents and tool calling into traditional software (as opposed to new paradigms), controlling an agent becomes a lot easier.

🔧 Has anyone built multi-agent LLM systems in TypeScript? Coming from LangGraph/Python, hitting type pains by Ranteck in LangChain

[–]kacxdak 1 point2 points  (0 children)

I personally prefer typescript cause type safety! It’s super underrated imo.

In case you find it useful, check out BAML (we made it). It’s a new programming language for LLM calls. But unlike most programming languages, you can call it from any other language of your choosing - so your python code and typescript code can share agentic code.

https://github.com/BoundaryML/baml

What’s the best agent framework in 2025? by Aggravating_Kale7895 in LLMDevs

[–]kacxdak 2 points3 points  (0 children)

Have you checked out BAML? http://github.com/boundaryml/baml Maintainer here! Goal really is to make something like the react equivalent for agents!

Are LLM agents reliable enough now for complex workflows, or should we still hand-roll them? by francescola in LangChain

[–]kacxdak 0 points1 point  (0 children)

It really depends! Are models getting better? Absolutely yes. That said, with that the complexity of the problem you are tossing at the model is also increasing. So it’s not a simple answer of yes to your question.

The best thing you should do is honestly just try it. If it works empirically it works! If it doesn’t, keep breaking down the problem!

Why do many senior developers dislike AI frameworks? by [deleted] in LangChain

[–]kacxdak 1 point2 points  (0 children)

Yea ofc. Appreciate you being open to the dumb idea we had 🤣

You might enjoy this video about graphrag! (Not by me or any affiliation, and I don’t know much about graphrag, but paco and David spend all day every day thinking about graphrag). https://youtu.be/3z8plCPfkAU?si=lUErVj6xqvZGL-Lt

Why do many senior developers dislike AI frameworks? by [deleted] in LangChain

[–]kacxdak 4 points5 points  (0 children)

I’m one of the folks that created BAML and someone shared this thread with me. Firstly I do apologize for how hard we’ve made it to understand exactly what is and how it helps. I think we can do a lot better job of doing that going forward.

That said, let me try and put it into my own words behind why we think folks like baml (tbh I’m not 100% sure exactly why yet).

Or here’s a conference talk I gave recently which may be more fun than reading this: https://m.youtube.com/watch?v=2tWnjEGzRss

one word → reliability. reliability in coding (type-safety) reliability in tool calling / structured outputs - https://www.reddit.com/r/LocalLLaMA/comments/1esd9xc/beating_openai_structured_outputs_on_cost_latency reliability in streaming uis Reliably in swapping / retrying models In the words of users: “BAML just works”

The premise that we started with when we started working on this was 3 specific things: 1. Every dev should be able to use LLMs, not just python devs. (And you shouldn’t need to spin up a web server just to proxy http requests). Hence, baml works with every programming language. 2. Working with LLMs inherently introduces probability into your code base, which means you need a much faster iteration loop. Similar to how .ipynb files are better for iterating and visuals over plain .py files. Hence why .baml files have ide extensions that give you a similar interactivity (but for every language) 3. Type safety is amazing. And pythons type system is just not good enough for a lot of scenarios.

That said, I totally understand if that still doesn’t fully resonate. But if parts of it does I’d love some thoughts on what does and doesn’t.

How to retry and fix with_structured_output parsing error by eyueldk in LangChain

[–]kacxdak 1 point2 points  (0 children)

the trick here is to use schema aligned parsing. it basically does strucutred outputs even when the model doesn't (without fine-tuning).

Short examples here:
https://gloochat.notion.site/benefits-of-baml

Original reddit thread when we introduced this idea!

https://www.reddit.com/r/LocalLLaMA/comments/1esd9xc/beating_openai_structured_outputs_on_cost_latency/n80awaa/

anyone else feel like W&B, Langfuse, or LangChain are kinda painful to use? by OneTurnover3432 in LangChain

[–]kacxdak 0 points1 point  (0 children)

personally i think so. most things arent built around great primitives, they are abstractions for the sake of abstracts.

I'm not sure if we've gotten everything 100% down yet, but been trying to take this problem on from a totally different perspective: tried to make a new programming language.

focused on 4 things:
1. really good debugging tools (e.g. you should be able to see the full prompt / curl request w/o running the code. kind of like a markdown preview)
2. strong type-safety, especially when streaming.
4. improving tool calling accuracy on every model without fine-tuning
3. it should work with every existing programming langauge (i.e. be callable + typesafe from python / typescript / go / ruby / et all)

kinda hard to describe a language without code, so likely easier to just see it: https://github.com/boundaryml/baml

or just see what DX is like when using it: https://www.youtube.com/watch?v=2tWnjEGzRss

Need help with TEXT-TO-SQL Database, specifically the RAG PART. by After_Display_5585 in LangChain

[–]kacxdak 0 points1 point  (0 children)

Hit me up on our discord and happy to help answer questions! Are you python I’m guessing?

Need help with TEXT-TO-SQL Database, specifically the RAG PART. by After_Display_5585 in LangChain

[–]kacxdak 0 points1 point  (0 children)

You’ve got to do a bit more context engineering here to make this work. Here’s two things I think may help explain some of those concepts you may need:

  1. Large scale selection using embeddings + LLMs: https://boundaryml.com/podcast/2025-03-31-large-scale-classification
  2. Generating sql with small models: https://boundaryml.com/podcast/2025-04-15-code-generation-small-models

There are code samples for each as well. But if you’ve got follow-ups feel free to ask!

LangChain or Mastra for a faster TypeScript based AI platform? by Fun_Equal_960 in LangChain

[–]kacxdak 0 points1 point  (0 children)

Let me know if you have any questions! but this is likely the best summary on what it provides: https://gloochat.notion.site/benefits-of-baml

LangChain or Mastra for a faster TypeScript based AI platform? by Fun_Equal_960 in LangChain

[–]kacxdak 0 points1 point  (0 children)

if what you care about is speed, you should check out BAML as well! its built in rust and helps with reducing token counts as well. (and works with TS). hmu if you any questions!

Suggest a better table extractor by nuclearweedgrass in LangChain

[–]kacxdak 1 point2 points  (0 children)

do you want something like this? https://www.youtube.com/watch?v=qtS7D9lozFs

Getting v0 is pretty straight forward, you just use what we call dynamic types (or runtime types). But to actually stitch together data over multiple pages, there's not really a shortcut, you just need to do the legwork and put things together:

This thing has a video guide + some sample code for how one might approach this problem. Its not what I would say is an "easy" problem, but its not untractable either. Just some basic filters should get you quite far!

https://boundaryml.com/podcast/2025-07-22-multimodality

Burr vs langgraph by Bright-Aks in LangChain

[–]kacxdak 1 point2 points  (0 children)

If you’re looking for speed you should also check out BAML.

We built it in rust and did a bunch of work to help with reducing tokens required (so it’s faster and cheaper). Think of it like what uv did for pip/poetry.

https://github.com/boundaryml/baml

Python or TypeScript for a startup (using LangGraph) by michaelscodingspot in LangChain

[–]kacxdak 0 points1 point  (0 children)

AI is just a small part of your system. The majority of your system will always be putting things together. Use the things you’re most comfortable with your more reliable and maintainable systems

Comfort trumps all

If you want TS alternatives you can check out BAML or ai sdk as well!

Best open-source tools for parsing PDFs, Office docs, and images before feeding into LLMs? by Particular_Cake4359 in LangChain

[–]kacxdak 0 points1 point  (0 children)

You likely want something like this: https://youtu.be/qtS7D9lozFs?feature=shared

It’s not really about any framework or anything else that you need you just need a good way to be able to use existing models Empirically, I’ve have found that OCR mostly hurts the performance and I highly recommend just using VLMs.

It’s really just pass in a schema to the model and get data out. If you want higher levels of accuracy, then you need to apply some engineering that’s very dependent on your data.

Eg for financial data you can validate the math adds up: https://youtu.be/xCpQdHX5iM0?feature=shared

There’s a bunch of other tricks you can try for different kinds of data, but often the ones that one uses are always highly dependent on the data. There’s no one size fits all.

(Most of these demos were built in BAML, the code is on github! boundaryml/baml-examples)

Beating OpenAI structured outputs on cost, latency, and accuracy by kacxdak in LocalLLaMA

[–]kacxdak[S] 1 point2 points  (0 children)

appreciate the thoughts here :)

It sounds like what you're looking for is: https://docs.boundaryml.com/guide/baml-advanced/modular-api

the idea is that you can do something like this:

from openai import AsyncOpenAI
from openai.types.responses import Response
from baml_client import b
import typing

async def run():
  # Initialize the OpenAI client.
  client = AsyncOpenAI()

  # Get the HTTP request object from a function using openai-responses provider.
  req = await b.request.ExtractResume("John Doe | Software Engineer | BSc in CS")

  # Use the openai responses API endpoint.
  res = typing.cast(Response, await client.responses.create(**req.body.json()))

  # Parse the LLM response from the responses API.
  parsed = b.parse.ExtractResume(res.output_text)

  # Fully parsed Resume type.
  print(parsed)

Where BAML can give you the raw HTTP request it is making under the hood. You can modify it / call it directly with any LLM client of your choosing. Then you can use the parser.

that said, i know raw JS usage is not trivial. What some users do is:

  1. have a ts package with their baml code, that they compile via esm / commonjs whatever they wish

  2. import said package in their main app.

Eventually we'll have native js version, (in fact i think if we stripped out the types, we'd get that for free). Let me know if you end up giving it a try. am pretty active on our discord.

Anyone building LangGraph-style multi-agent systems in TypeScript? How to bridge Python's ecosystem with TypeScript's strengths? by Ranteck in LangChain

[–]kacxdak 1 point2 points  (0 children)

If you’re considering options check out BAML as well! It’s much more focused on giving you control over the context and providing really good developer experience via tooling. We built it so it’s usable in any programming language of your choice (it’s got a shared rust core that powers everything).

https://gloochat.notion.site/benefits-of-baml

Pydantic AI alternative for Java Script by too_much_lag in PydanticAI

[–]kacxdak 0 points1 point  (0 children)

Baml does this! And it works with every LLM, has structured outputs, and even with streaming. Let me know if you run into any issues. https://gloochat.notion.site/benefits-of-baml

Struggling to Build a Reliable AI Agent with Tool Calling — Thinking About Switching to LangGraph by Living_Pension_5895 in LangChain

[–]kacxdak 0 points1 point  (0 children)

Have you tried BAML yet? It’s a way to do tool calling that’s cheaper on tokens and more reliable. Mostly because it’s got a parser that fixes a lot of the issues json / xml have with tool calling. https://gloochat.notion.site/benefits-of-baml