r/LLMDevs • • 8h ago

Help Wanted Is there a LeetCode for agent engineering? Where do you prove you can build production AI systems?

5 Upvotes

I'm a backend engineer in payments (Go, Kafka, AWS). I already build agentic tooling at work and want to move into agent/AI engineering roles.

LeetCode and HackerRank prove algorithm skills. I'm looking for the equivalent for agents: somewhere that shows I can build systems that hold up in production (evals, reliability, cost control, tool/MCP design, security), not just a demo that works once. I'm a backend engineer in payments (Go, Kafka, AWS). I already build agentic tooling at work and want to move into agent/AI engineering roles.

LeetCode and HackerRank prove algorithm skills. I'm looking for the equivalent for agents: somewhere that shows I can build systems that hold up in production (evals, reliability, cost control, tool/MCP design, security), not just a demo that works once.


r/LLMDevs • • 8h ago

Help Wanted I launched a structured output generation API, but nobody seems to care. What am I missing?

Thumbnail
gallery
0 Upvotes

I recently launched an API platform for structured output generation across different LLMs.

The idea came from a problem I faced while building my own AI harness. I thought other developers might find it useful too, so I turned it into a standalone API.

Currently, it supports:

  • Single-schema structured output generation.
  • Selecting one relevant schema from multiple schemas.
  • Selecting multiple relevant schemas and generating an array of structured outputs.
  • Text and image inputs.
  • Multiple LLM providers through a common API.
  • Automatic schema validation and retries.

I've attached a few examples showing how it works.

It's been over a week since launch. I've reached out to developers, received some feedback, but nobody has actually tried it yet.

I'm currently exploring a few additional capabilities:

  • Direct document-to-JSON generation.
  • LLM-based semantic validation to check whether the output is actually correct, not just schema-valid.
  • Custom validation endpoints that allow developers to validate generated outputs against their own business logic, with automatic retries on failure.

But before spending more time building, I want to understand what developers actually need.

For those working with LLMs, what is this platform missing that would make it worth using? Are there any pain points with structured output generation that existing solutions don't address well?

Or is this simply a problem that's already sufficiently solved?

I'd genuinely appreciate some critical feedback, even if it's negative.


r/LLMDevs • • 7h ago

Discussion Can you apply caveman in an LLM's internal reasoning?

0 Upvotes

Hey, someone propably thought of this already or something like that?

When i use deepseek v4.1 free on opencode and check the internal reasoning, it is very verbose and repeating itself

So im thinking what if we apply simple caveman type of talking reasoning inside

Or even even better use another langauae like chinese for the internal reasoning cuz it is a more efficient language, but translate back to english when done?


r/LLMDevs • • 10h ago

Discussion My Understanding of Harness and Context

0 Upvotes

This talks about harness, context, evals and RL Environments

Agent Harness: This involves engineering systems around model intelligence. There are 3 sides of same problem: what wraps model, what goes in the window, how we know it works:

  • Harness: what wraps the model
  • Context: what does in the window
  • Evals: training data for the harness

If you are not the model you are the harness (Agent = Model + Harness). Let’s talk about some Harness primitives, each one patches a specific model deficiency:

  1. File System: Non Durable State
  2. Bash + Code: No general purpose action
  3. Sandbox: unsafe execution at scale
  4. Sub agents: context contamination
  5. Middleware: no deterministic interventions

Why is a Harness so Important ?

Same Model with different harness, why don’t they get the same score. We pay companies for compute (in the forms of tokens to rent & run their proprietary LLMs) .

Now the coding harnesses like Codex & Claude Code that they provide abstracts a lot of what it does under the hood and how it routes calls to the LLM models which limits our control over the models.

Like a harness used in rock climbing to anchor to a stable point so that we don’t drift off, similarly an agent harness is everything around model which grounds it to a stable environment.

It Includes: Tool Registry, Model, Context Management, Guardrails, Agent loop

Ex: BrowserUse Harness for Hacker News: Go to Hacker news using the playwright browser and give the agent harness tools to interact with browser session and system prompt to carry out task

Model Harness Fit:

Harness is part of the model’s effective parameters. Same operations, different vocabs, backed in by post training

3 Consequences:

  1. No model agnostic agent: honest version, per model harness you pick a product not a model
  2. Mid chat model swaps break: transcript OOD, cache miss, tool surface mismatch, all at once
  3. Matched pair shifts: yesterday’s load bearing scaffold is today’s dead weight

Primitives are derived, not invented. Match the pair: harness = model and scaffolding goes stale, delete code. Now we can add primitives and watch failures fix:

  • tool result clearing: fix output bloat
  • loop detection: break out of doom loops
  • sub agent dispatch: protect parent context

Context Rot: Accuracy declines with input length (frontier models break on a trivial copy task as input grows).

Context is finite, in performance not just tokens (n tokens = n2 pairwise relationships, every token costs attention budget). So in principle use the smallest set of high signal tokens since Context has diminishing marginal returns.

Right altitude: system prompts not too rigid, not too vague

  • brittle: hardcoded if/else
  • goldilocks: specific behaviour, flexible judgements
  • vague: be helpful, be safe

Long horizon strategies:

  1. compaction: used in conversational flow. Ex: summary-then-continue
  2. note taking: used when iterative milestones. Ex: Notes[dot]md and scratchpad
  3. sub agent: parallel exploration. Ex: clean context per branch

Evals: Training data for harness improvements since harness + evals + harness engineering lead to a better agent (same loop as supervised learning, gradient flows into the harness)

Mirage of Generic Metrics: MMLU, HELM, BERTScore, these don’t tell you if your product works, you need custom evals catered towards your product.

Critique shadowing: Hamel husain’s process of building product evals

  1. Find THE principal domain expert
  2. Build diverse dataset (features × scenarios × personas)
  3. Pass / fail + detailed critique
  4. Fix obvious agent errors
  5. Build LLM judge, iterate to alignment
  6. Error analysis at scale

LLM Judgment alignment: diff splits than ML, small train, big test

The harness flywheel:

Build an aligned LLM judge:

  1. Synthesize 20 diverse queries for company-research agent
  2. Hand-label pass / fail with critiques
  3. Train / dev / test split — write judge v1 (no few-shot)
  4. Iterate to v2 with few-shot, lock and test
  5. Cluster failure modes → harness backlog

Three Takeaways:

  1. Agent = Model + Harness: harness is part of the model’s effective parameters
  2. Context is finite — in performance. smallest set of high-signal tokens, JIT > pre-load
  3. Evals are training data: binary > Likert, aligned LLM judge, the flywheel never ends

RL Environments for LLMs:

Environments are synthetic data engines, RL trainers and eval harness the same artifact, three jobs. Thus same environment (same artifact) can be used for all of these 4 use-cases:

  1. Evaluation (run rollout, average rubric)
  2. RL training (rubric scores, become rewards)
  3. Synthetic data generation (keep high rubric rollouts)
  4. Agent harness experimentation (swap models, swap scaffolds)

Dataset: Task Inputs usually with ground truth or rubric

  • GSM8K — grade-school math
  • HumanEval — coding problems with tests
  • τ-bench — customer service dialogues
  • SWE-bench — real GitHub issues
  • BrowseComp — web research tasks

Build it once. Use it four ways. Now lets revise how RL works where the goal is to learn a policy that maximises cumulative reward. Everything in modern LLM RL training is a special case of this loop.

But how does classical RL translate to RL in LLMs

Why verifiability equals unhackability ?

The reward function has nothing to manipulate expect the actual capability you want

But why study about environments now, since closed labs are racing to build proprietary envs.

Ex: for INTELLECT-3

  • Released: 26 November 2025
  • Architecture: 106B Mixture-of-Experts
  • Base model: GLM-4.5-Air
  • Compute: 512 NVIDIA H200 GPUs · ~2 months
  • Stack: Verifiers + Environments Hub + prime-rl

Verifiers:

Built by Prime Intellect (github[dot]com/PrimeIntellect-ai/verifiers), it is an open source Python framework for training and evaluating AI models using environments, tools and reward functions.

Think of it as infrastructure that teaches an AI agent how to perform tasks and measures whether it performed them correctly.

Imagine you want to train an AI agent that can solve Python programming problems. You need to:

  1. Give the model a programming question
  2. Let it generate code
  3. Execute that code
  4. Check whether the code passes the test cases
  5. Give the model a score based on its performance
  6. Use that score to improve the model through reinforcement learning (RL)

Core Abstractions of Abstraction:

  • SingleTurnEnv: One prompt, one response
  • MultiTurnEnv: Iterative Dialogue
  • ToolEnv: Native tool calling
  • CodeEnv: Code Execution
  • Rubric: Composable scoring
  • Parser: Structured Extraction

OpenEnv:

OpenEnv is an open-source framework for creating and running isolated environments in which AI agents can interact with the real world through standardized APIs.

It is developed through collaboration between Meta and Hugging Face, and was presented at the PyTorch Conference on 23 October 2025.

The easiest way to understand it:

Imagine you build an AI agent that needs to interact with a computer, execute code, use a browser, or operate a simulated environment.

You need a controlled place where the agent can:

  • Take an action
  • Observe what happened
  • Take another action
  • Reset the environment
  • Eventually finish the task

OpenEnv provides infrastructure for building these environments. The Environments Hub is a public registry (like a pip for environments) so every published env can be evaluated, used as a data engine, or trained on.

So to summarise the main points:

  • same model, different harness leads to different results so model harness fit is important
  • Environment = dataset + rollout + rubric (3 pieces)
  • Same artifact: eval, training, data , harness (Build once, use 4 ways)
  • Rubric brittleness is the #1 footgun (parse first, score second)
  • Verifiable rewards are unhackable (everything else, you fight)
  • Multi turn is where the real RL lives (single turn is for benchmarks)

r/LLMDevs • • 18h ago

Help Wanted What backend topics are required for AI engineering?

1 Upvotes

I'm currently pursuing a career in AI engineering and want to build strong backend skills without going too deep into traditional backend development.

What backend topics should I focus on? Is learning FastAPI, databases, authentication, and deployment enough, or are there other essential topics?


r/LLMDevs • • 20h ago

Discussion How would you bill context optimization? I settled on 0.8x the unoptimized equivalent

1 Upvotes

I'm building a small AI gateway with a coding workspace and ran into a pricing problem: if a context optimizer cuts upstream tokens by 80%, what do you charge?

Options I considered:

  1. Bill actual optimized tokens. Simple, but the discount depends on how aggressive retrieval is, and quality can drop silently.
  2. Bill the unoptimized equivalent. Stable, but then the user gets no benefit from optimization.
  3. Bill a fixed multiple of the unoptimized equivalent when optimization succeeds. Predictable and still rewards the user.

I went with option 3: Graphify mode charges 0.8x the disclosed unoptimized-workspace equivalent when the local graph actually reduces context. If it doesn't reduce anything, normal Standard pricing applies. Burst stacks afterward, so Graphify + Burst is 1.25x base vs 1.5625x for Standard + Burst.

To keep it auditable, every response shows actual optimized tokens, equivalent billed tokens, upstream cost and charged amount separately. Benchmark ratios are never used as billing inputs.

The obvious criticism is that "equivalent" is a made-up unit. The counter is that it's disclosed, stable and tied to a workspace the backend controls, rather than a client-supplied baseline.

How would you structure this? Genuinely interested in better models: https://justai.cloud/#/?tag=reddit-llmdevs


r/LLMDevs • • 13h ago

Discussion Why are we defaulting to LLMs to verify the outputs of other LLMs?

5 Upvotes

I've been experimenting with a different approach to enforcing engineering conventions and business rules.

Instead of asking an LLM to review an entire output against a set of instructions, we break each rule into narrow, testable assertions.

  • Deterministic logic wherever possible
  • Specialized decision models or classifiers when semantic judgment is necessary
  • Explicit passing and failing examples for each rule
  • Rules and evaluation datasets independent of the model

In one experiment, 97.6% of checks could be handled before making a model call.
The more interesting challenge is semantic verification. Can smaller, specialized models reliably evaluate previously unseen rules without requiring task-specific training?

I'm exploring this with a project here is the link: https://github.com/feuersteiner/agentests

I'd particularly appreciate feedback from people experimenting with classifiers, NLI models and alternatives to LLM-as-a-judge.
Thank you!


r/LLMDevs • • 4h ago

Tools I built a local LLM training lab to help people learn how to train models on their own hardware

Thumbnail
gallery
5 Upvotes

Hi everyone,

Like many others, I got into model training after going through Karpathy's nanochat and Sebastian Raschka's LLMs from Scratch book. Both were great, and after training a few tiny models on my own computer I ended up putting together the kind of lab I wish I had when I started.

Each lesson has interactive visuals in the browser paired with actual PyTorch scripts and a local dashboard, so you can run the code on your own GPU (or laptop) and watch what happens to the loss and outputs right away. I believe we learn way better by breaking things and tweaking configs than just reading.

Repo is here if anyone wants to check it out: https://github.com/petrenk0n/stepzero

Right now there are 4 lessons covering the training loop, model sizing, stability, and attention, plus a small local runner so you don't even have to leave the UI to kick off an ablation. Still adding more lessons as I go. Also threw in a guide for your agent, if you prefer to learn with ai.

Just sharing in case it's useful to anyone else digging into this stuff.


r/LLMDevs • • 21h ago

Help Wanted Migrating off OpenRouter after a -$117 prepaid overdraft (203 requests dispatched after balance hit $0). Is Opper reliable for hard spend limits?

Post image
5 Upvotes

I am migrating my stack off OpenRouter and looking for a multi-model router with reliable billing guardrails. Before moving over, I wanted to share the billing audit from my incident for other devs using OpenRouter in production, and ask if anyone here has experience with Opper (opper.ai).

Quick summary of the incident:

On Nov 16, one of my API keys was compromised and hit with 2,521 unauthorized google/gemini-4-carbon requests ($429.43 total). My prepaid account had $12.42 in initial credits plus 30 Stripe Auto Top-ups ($300 in credits, $324 billed), leaving a final balance of -$117.01.

Cross-referencing my Activity CSV with all 30 Stripe receipts exposed 5 separate issues that make it impossible for me to trust OpenRouter as an API gateway anymore:

  1. Upstream exposure with no auditability: OpenRouter support confirmed in their reply that an upstream provider (GMI Cloud) reported unauthorized access to request data and is under investigation. My key was stored inside an internal-only self-hosted router, not in environment variables or a public repo.
  2. No velocity cap on Auto Top-up: Auto Top-up triggered 30 times in minutes (up to 5 times in a single minute) before my bank blocked the card.
  3. Requests dispatched while settled balance was <= $0: Even assuming a 0-second Stripe webhook delay, at least 344 requests ($53.40) were dispatched while my settled balance was already <= $0. After the final $10 top-up cleared at 04:22:09 UTC and all $312.42 in credits were exhausted at 04:22:13.4 UTC, OpenRouter kept dispatching 203 new requests ($31.86) over the next 43.2 seconds (peaking at 19 req/s at 04:22:21 UTC). Their own API Limits docs state they enforce account balance limits with HTTP 402.
  4. Collateral account restriction: My account was restricted from closed-weight models (Anthropic, Google, OpenAI) due to the attacker's traffic, and support did not address it.
  5. Support gap: Nearly 3 weeks to get a reply, which was a generic Terms of Service denial that ignored the -$117.01 overdraft and enforcement delay.

Full timeline and logs from my original thread if you want to inspect the breakdown:

https://www.reddit.com/r/openrouter/comments/1y6nwgu/no_response_from_support_for_10_days_after_gmi/

My biggest concern from an engineering standpoint is simple: if a prepaid account can keep dispatching requests at <= $0 and drop to -$117.01, how do I even know it won't keep letting requests through from -$117?

For those who have moved away from OpenRouter, is Opper (opper.ai) a solid alternative in terms of reliability, strict spend enforcement, and provider security? Also open to other gateway or self-hosted proxy setups if you have recommendations that handle hard budget caps properly.


r/LLMDevs • • 11h ago

Discussion The cloud model plans, local Qwen writes: 91% fewer cloud tokens and better-tested code

Post image
0 Upvotes

I gave two OMP sessions the same application development task. In one, GPT-6 Luna did everything itself. In the other, a more capable cloud Luna planned the work and coordinated it, while local Qwen on the GPU wrote the backend and frontend. I wanted to see whether I could entrust a local model with more than just tests, whether it could handle a substantial part of the implementation. In this setup, Qwen became the workhorse for tasks broken down by the cloud model. The hybrid approach cut cloud token usage by 91% and produced more structured, better-tested code. But I had to wait 39 minutes for the final response instead of 18, about 2.1 times longer. These were two separate runs, not a statistical benchmark. The result shows a practical trade-off: the local model handles a large share of the coding, while the cloud model helps bring it to a high-quality finish.

I sent both sessions exactly the same task:

I need a task manager built. The web application should use Angular and Material, with a Rust backend and an SQLite database. It must include a login form and a task list, with functionality to add, delete, and edit tasks, as well as mark them as completed.

The prompt did not specify a data schema, security requirements, field constraints, or a testing plan. The agents had to choose the implementation details themselves.

Hybrid sessionCloud-only
OrchestratorGPT-6 Luna, reasoning maxGPT-6 Luna, reasoning max
ImplementersQwen4-35B-A3B-130K in Strata, reasoning highGPT-6 Luna in the same main session
Task breakdownA separate agent for the Rust backend, then one for the Angular frontendOne agent handles the entire project
Local modelUsedNot used

In the hybrid setup, the local agents worked sequentially: RustBackend first, then AngularFrontend. The cloud orchestrator broke the work into parts, gave the implementers their tasks and an API contract, then checked the integrated result. The cloud model kept track of the overall plan and integration; the local model handled specific, substantial subtasks.

I compare GPT-6 Luna usage separately from Qwen. Otherwise, one column would include paid cloud tokens, while the other would also include local compute.

MetricHybridCloud-only
Time to final response39:2318:27
GPT-6 Luna tokens, including cached tokens300,7633,524,338
GPT-6 Luna input + output, excluding cache77,147185,842
Cloud output5,85845,514
Estimated GPT-6 Luna cost at standard API rates$0.0123$0.0702

In the hybrid run, GPT-6 Luna used 3.22 million fewer tokens than in cloud-only when cached tokens are included, a reduction of 91.47%. Counting only uncached input and output, the difference is 108,695 tokens, or 58.49%. Cloud output fell by 87.13%. At GPT-6 Luna’s standard API rates, that amounts to estimated savings of about $0.058 for this task, or 82.48%. This estimates API call costs, not usage of the ChatGPT Plus allowance. I did not measure electricity use or GPU depreciation. The dollar difference is small for a single task. If you repeat tasks like this hundreds of times, the savings become more noticeable. And if the work is urgent, the nearly 21 extra minutes per task may matter more than a few cents.

Both versions implemented the required baseline: login, a task list, and the ability to create, edit, and delete tasks, and mark them as complete. Cloud-only also added priorities, due dates, search, and filters. Its sessions also persisted across server restarts.

Local Qwen did more than write tests: it wrote application code for the Rust backend and Angular frontend. But it did not have to design the architecture for the whole application, maintain boundaries between modules, or integrate the results on its own. GPT-6 Luna, the more capable cloud model, handled that role: it broke down the work, assigned subtasks, aligned the API contract, and checked the integration. In this experiment, the local model was the workhorse, while the cloud model acted as planner and coordinator.

The hybrid version had better structure and test coverage. The backend was split into modules; the frontend was organized into services, a guard, an interceptor, pages, and components. It included 25 backend unit tests and 12 API integration tests, plus 32 Angular tests across six files. It also had recorded checks for formatting, Clippy, a production build, and integration smoke tests.

In the cloud-only version, most of the backend was in one file, and the UI was in one large component. The logs show one backend lifecycle test and a production build; frontend unit tests were either not run or not recorded. This does not mean the application does not work. It means the hybrid version has more evidence that individual scenarios will keep working after the next change.

In a static assessment of the final files against six criteria, ranging from requirement coverage and structure to testability and UI, the hybrid setup scored 4.4 out of 5, while cloud-only scored 3.8. This is my expert assessment of the overall setup, not an automated quality metric. From a single run, it is impossible to separate Luna’s contribution through planning from the contributions of local Qwen and the integration process. So “better code” here means specific things: responsibilities were more clearly separated, input constraints received more thorough checks, and test coverage was broader. Cloud-only has an advantage in extra features and persistent sessions. I did not rerun the tests; I compared the final files and the checks recorded by the sessions themselves.

Token generation speed is only one part of a coding agent’s runtime. Reasoning, context handling, the number of file operations, and running checks also matter. In the hybrid session, local Qwen recorded 97,624 reasoning tokens. Its inference requests took about 31 minutes of active time in total. The two agents worked sequentially, and each agent’s context approached 95,000 tokens. Both needed context compaction; those operations took about 107 seconds combined. The hybrid run made 386 tool calls, compared with 85 for cloud-only. Some calls failed and required retries or corrections: 18 failed tool calls in the hybrid run and 6 in cloud-only. That count alone does not mean every such call was useless, but it shows how many extra cycles task splitting and subsequent integration can add. What took longer was not so much code generation as the overall process: two substantial local stages, handing off the contract, investigating errors, and checking the project again.

In the original Session Info, the hybrid session showed 15.29 million tokens, compared with 3.44 million for cloud-only. At first glance, that makes it look as if the hybrid run used more tokens. But the aggregate includes requests to local Qwen agents and cached tokens. The full logs show 15.68 million tokens for hybrid and 3.52 million for cloud-only. Of the hybrid total, about 15.38 million came from local Qwen and only 300,763 from GPT-6 Luna. Local tokens are not billed like API tokens, though the computations still consume electricity and GPU resources. So to answer “How much did the cloud portion cost?”, you need to look at each model’s usage separately. A single overall counter mixes different things: local and cloud inference, cache reads, and regular input and output.

By the way, I found a separate benchmark of Qwen4-35B-A3B in Q4 on the same RTX 4070 Ti SUPER, with 16 GB of VRAM and 96 GB of RAM. On Ubuntu, using Strata 0.2.26, UD-Q4_K_M, and MTP depth 3, the benchmark author measured generation speeds of 156–179 tokens/s on two short Python tasks. Counting the entire prompt, the speed was 140–142 tokens/s. For the reasoning task, the reported speeds were 114 and 77 tokens/s, respectively. On my Windows machine, using Strata with the same settings, I got about 100 tokens/s during inference and a 130K context window. I have a single GPU, which also serves the system; there is no integrated graphics. This may affect speed, but I did not run a controlled comparison between Ubuntu and Windows, so it would be wrong to attribute the entire difference to the operating system. A local model is already useful for more than generating tests: in this experiment, it wrote substantial parts of the application. Still, even 100 tokens/s does not guarantee a fast result. An agent may spend a long time reasoning, rereading files, running checks, and compacting context. For development, generation speed matters, but so does how many of these cycles it takes to reach a working, verified result.

If I want a testable, modular foundation and can wait, the hybrid approach looks useful: local agents handle a substantial share of the reasoning and implementation, while the cloud orchestrator uses fewer tokens. If I need an answer as quickly as possible, cloud-only finished about twice as fast in this run. There is room to speed up the hybrid approach: define the API contract upfront, run independent parts in parallel, limit repeated reads of large files, and avoid using maximum reasoning for every routine change. That does not remove its main trade-off: lower cloud usage and more thorough checks come at the cost of local inference and orchestration time. My takeaway is that a local GPU can help produce better-structured, better-tested code while noticeably reducing cloud usage. In this task, it nearly doubled the time to get a result. If you were choosing for your day-to-day development, what would matter more: finishing sooner, or using fewer cloud tokens and checking the code more thoroughly?


r/LLMDevs • • 16h ago

Resource How DoorDash Reduced LLM Search Costs by 98% Without Losing Accuracy

Thumbnail careersatdoordash.com
15 Upvotes

DoorDash reduced search-provider costs in its large language model (LLM)-powered query understanding system by more than 98% while maintaining comparable accuracy on production workloads. The company introduced Decoupled Search Grounding (DSG), an MCP-compatible gateway that separates evidence retrieval from model reasoning, allowing applications to switch search providers independently of the underlying model.

Native LLM search integrations bundle retrieval into the model provider's API, limiting provider choice, result reuse, retrieval-depth controls, and cost visibility. DSG exposes these capabilities through a shared interface rather than embedding search integrations in individual agents.

The gateway supports multiple search providers, including Serper, Bright Data, Firecrawl, Exa, and Tavily, as well as native search capabilities offered by model providers such as OpenAI and Anthropic. It normalizes provider responses into a common format containing titles, URLs, and content snippets, keeping retrieved evidence separate from model-generated responses.


r/LLMDevs • • 21h ago

Tools Qwen4-35B-A3B running at up to 280 Tok/s on M5 Ultra Superfluid

Post image
9 Upvotes

We’ve been working on day-zero support for Qwen4 in Superfluid and are already seeing upto 280 tok/s decode on an M5 Ultra. Really impressed by what this model can do with just 3B active parameters in terms of agentic capabilities running locally.

Give it a try and let u know what you think. https://github.com/basecompute/baseRT


r/LLMDevs • • 7h ago

Discussion Google budget alerts run on spend data that can lag up to 24h. An overnight Gemini job hit C$75,951 before anything fired. How to guard unattended LLM jobs

3 Upvotes

Google's budget alerts run on actual spend, and the Cloud Billing docs say calculating actual spend "typically takes up to 24 hours." That lag is what sank a developer this week. He posted in r/googlecloud that an overnight Gemini 2.5 Flash job on Vertex AI spent C$75,951 before anything stopped it, and what finally stopped it was his card declining an auto charge.

What he says arrived, and when:

  1. Early signal anomaly alert, which Google's docs promise "with an expected latency of 20 to 40 minutes": came 9h42m after spend started, and couldn't name the product.
  2. 50, 80 and 100 percent budget emails on a C$286 budget: never came.
  3. 120 percent and forecasted emails: over two hours after he'd already killed the job.

That's one person's account, and I couldn't find a public reply from Google. A Pub/Sub kill switch wired to a normal budget would have fired on the same late numbers.

How i'd guard an unattended LLM job now:

  1. If it's your own loop of API calls, meter it yourself. Gemini responses include usage metadata, so multiply tokens by list price, keep a running total, and stop at a hard number. Nothing is faster than that.
  2. Set a provider spend cap as the backstop. Google's caps went GA on Oct 30, run on estimated cost and trigger within minutes for AI services. Read the limits first: not instant, overage still billed, one project and one service per cap, credits ignored, Provisioned Throughput never halted. Eligible: Gemini API, Vertex AI, Cloud Run, Cloud Run functions.
  3. Treat budget alerts as receipts.

If you submit a batch job and walk away, layer 1 doesn't exist and the cap is the only thing that can stop it.

Thread: https://www.reddit.com/r/googlecloud/comments/1yazk1p/ Spend cap docs: https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps Budget API docs: https://docs.cloud.google.com/billing/docs/how-to/budget-api-overview


r/LLMDevs • • 9h ago

Discussion I built a docs bot that refuses to guess. My hidden test set exposed a failure I couldn't fully fix.

5 Upvotes

RAG over 8 FastAPI tutorial pages (ChromaDB, MiniLM, Gemini flash-lite, Streamlit). It answers with a cited source or replies `NOT_IN_DOCS`.

Eval: 25 cases, 15 dev / 10 hidden. Dev went 10/14 → 14/14 after tuning; hidden (run once) scored 9/10.

Distance alone couldn't separate answerable from out-of-docs questions (1.36 vs 1.12), and the one hidden failure was a false refusal from wrong top-ranked chunks. Untried: hybrid search, re-ranking.

Caveat: questions were AI-drafted and I verified only 9 of 25 answers.

Repo: https://github.com/ztsprofessionalaiid7-alt/rag-bot

Would you try hybrid search or re-ranking first?


r/LLMDevs • • 10h ago

Discussion What if we replaced some serial Transformer layers with parallel computation along the depth axis?

Post image
2 Upvotes

I've been experimenting with small language model architectures and had an idea: why not replace some serial Transformer layers with parallel computation along the depth axis?

I call it ParDepth (Parallel Depth).

Instead of using only the final hidden state, ParDepth collects intermediate layer states, performs bidirectional attention along the depth axis, and then applies linear fusion followed by a single SwiGLU FFN.

Some interesting engineering properties:

  • Reduced persistent KV cache when replacing token-attention layers.
  • Exact skipping of ParDepth computation at unnecessary positions during prefill.
  • Parallel depth projections using batched GEMM.
  • No need to sacrifice full multi-head attention for KV cache reduction.

I've implemented it and am currently using it in my own model's pretraining.

I have limited compute and honestly don't know how well it scales. If you have the GPUs and find this interesting, give it a try. Whether it works or not, let me know!

GitHub: https://github.com/EliteytGe/ParDepth


r/LLMDevs • • 11h ago

Discussion I put a free no-signup website host online for AI agents 11 days ago and watched the logs (66k requests, 91 HTTP writes vs 1 MCP)

Thumbnail
gallery
8 Upvotes

I put a free no-signup static site host online for AI agents (https://iko.run) 11 days ago to see if agents would find it and what they would actually publish.

66,402 requests and 65 published pages later, here is what showed up in the logs:

  • Someone is running a real warehouse orders app on it (27 deploys, no account, just a private key)
  • A local beauty salon put up its front page
  • A probe bot left a polite note in X-Agent-Summary: "Short-TTL test page to inspect robots and link attributes, then expire"
  • An SEO bot voluntarily signed its header X-Agent-Name: backlink-man (subdomains are noindex)
  • 91 writes came over plain HTTP API calls, 4 via the browser form, and only 1 used MCP
  • Exa crawled it as many times as Googlebot (21 visits each), followed by OpenAI (18) and Claude (11). 29% of bot reads hit /llms.txt, markdown endpoints, or /openapi.json directly.

A few takeaways if you are building tools for agents right now:

  1. Expose a plain HTTP API first. MCP barely got touched even though it is advertised right next to the REST API.
  2. Ship /llms.txt, /SKILL.md, and markdown variants, unblock indexers, and pick an uncrowded name. Agents and AI search crawlers actually read them.
  3. The agent web is already weirdly alive.

Happy to answer questions about the logs or setup.


r/LLMDevs • • 15h ago

Help Wanted I added a 10-second EvalSeal demo: a 0.92 eval score still failed the CI gate

2 Upvotes

Someone read the EvalSeal repo and pointed out that the README explained the idea without showing what the tool actually did. Fair feedback, so I put a short terminal replay near the top.

It runs a recorded LLM evaluation with 20 cases and five verdicts per case. The mean is 0.92, above the 0.85 threshold. The receipt ledger verifies. But five cases exceed the 10% flip-rate limit, so the CI gate exits 3.

That’s the problem I built EvalSeal to make visible: an average can clear your threshold while individual cases keep changing verdicts. The demo uses committed responses, so you can replay the workflow without an API key.

If you use LLM judges in CI, what would you actually block on: one unstable case, a set of critical cases, or only a drop in the overall score?

Repo and demo


r/LLMDevs • • 16h ago

Tools Four of the six RAG/GraphRAG systems I benchmarked never handed the model the figure a question was about, so I built one that reads each page's outline instead (open source)

2 Upvotes

Disclosure: I built this. It's Graph-Me-Maybe, open source (Apache-2.0) and free, with no paid tier.

TL;DR: On MMLongBench-Doc, text-chunk pipelines (RAG, LightRAG, GraphRAG, HippoRAG 2) gave the answering model the figure a question was about in 0% of the questions that needed one. Reading every page as an image and keeping each document's own outline as the graph got that to 86%, and overall accuracy to 72%.

The problem

Long PDFs, slide decks and spreadsheets answer a lot of questions in tables, charts and layout. Most pipelines turn pages into text chunks first and extract entities from the text afterwards. By the time retrieval runs, the figure is already gone.

What I measured

MMLongBench-Doc marks the evidence for each question. On the 178 questions with evidence, this is how often that evidence reached the answering model. A chart or picture question counts only if the picture itself was handed over.

systemevidence handed overfigure evidence handed overaccuracy (all 243)
Graph-Me-Maybe93.8%85.9%72.0%
RAG-Anything84.3%60.6%67.5%
LightRAG59.6%0%58.8%
Text RAG39.3%0%49.8%
HippoRAG 231.5%0%46.1%
Microsoft GraphRAG42.7%0%44.4%

On DocBench (annual reports, legal and government documents, papers, news; 160 questions) it scored 83.1%, against 79.1% for LightRAG and 78.1% for RAG-Anything.

Setup: every system got the same documents and the same answering model (Claude Haiku 5.5). Claude Opus 5.5 graded each answer against the dataset's reference answer.

What it does differently

  1. Every page (Word, Excel, PowerPoint, PDF including scans, and mail) is rendered to an image. A vision model reads the page's outline: sections, paragraphs, tables as cell ranges, and figures with their crop.
  2. Each document becomes its own outline tree in the graph. There is no separate entity-extraction pass. Documents are linked when they cite each other, reply to each other, or are versions of the same file.
  3. Search is hybrid (vector + full-text, fused with weighted RRF) over graph chunks, and a hit can expand to its whole section.
  4. The answer step gets the passages plus the figure crops (about 12 per question). A second pass ties each claim to the passage it cites, so the app can highlight the exact cell, slide or paragraph on the original page.

Cost and speed (MMLongBench-Doc, Claude Haiku 5.5 at API prices)

  • Indexing: 20 minutes, against 24 for GraphRAG's fast mode and 5.8 hours for RAG-Anything.
  • Stored size: 1.25x the source documents, against 8.9x for RAG-Anything.
  • Per question: about half a cent ($0.0054), or 44k tokens. Most of that is text passages; the figure crops are about 5k.

Per-type scores, costs and timings: https://graphme.io/benchmarks/

Using it

It's a desktop app for macOS, Windows and Linux with its own Neo4j bundled (no Docker). It reads local folders, synced cloud drives and mail. It also runs an MCP server, so Claude Code, Claude Desktop or Cursor can search the same graph. Pages are read with an OpenAI, Anthropic or Gemini API key, or with a Claude, ChatGPT or Gemini subscription you already have.

A question for people doing document QA: do you pass figure crops to the answering model at question time, or caption the figures at index time and keep everything as text?


r/LLMDevs • • 4h ago

Discussion What catches a small local model's valid but wrong tool call?

3 Upvotes

I'm asking for personal learning, with no personal data collection or monetization of replies; an AI assistant helped word this. What catches the wrong file or recipient before execution when the tool name and JSON are valid, and when do you route to a bigger model?