frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: LLML: Data Structures => Prompts

1•knrz•5h ago
I've been building AI systems for a while and kept hitting the same wall - prompt engineering felt like string concatenation hell. Every complex prompt became a maintenance nightmare of f-strings and template literals.

So I built LLML - think of it as React for prompts. Just as React is data => UI, LLML is data => prompt.

The Problem:

  # We've all written this...
  prompt = f"Role: {role}\n"  
  prompt += f"Context: {json.dumps(context)}\n"  
  for i, rule in enumerate(rules):  
      prompt += f"{i+1}. {rule}\n"  
  
  # The Solution:  
  from zenbase_llml import llml  
  
  # Compose prompts by composing data
  context = get_user_context()
  prompt = llml({  
      "role": "Senior Engineer",  
      "context": context,
      "rules": ["Never skip tests", "Always review deps"],
      "task": "Deploy the service safely"
  })

  # Output:  
  <role>Senior Engineer</role>  
  <context>  
    ...  
  </context>  
  <rules>  
    <rules-1>Never skip tests</rules-1>  
    <rules-2>Always review deps</rules-2>  
  </rules>  
  <task>Deploy the service safely</task>  
Why XML-like? We found LLMs parse structured formats with clear boundaries (<tag>content</tag>) more reliably than JSON or YAML. The numbered lists (<rules-1>, <rules-2>) prevent ordering confusion.

Available in Python and TypeScript:

  pip/poetry/uv/rye install zenbase-llml
  npm/pnpm/yarn/bun install @zenbase/llml
Experimental Rust and Go implementations also available for the adventurous :)

Key features:

  - ≤1 dependencies
  - Extensible formatter system (create custom formatters for your domain objects)
  - 100% test coverage (TypeScript), 92% (Python)
  - Identical output across all language implementations
The formatter system is particularly neat - you can override how any data type is serialized, making it easy to handle domain-specific objects or sensitive data.

GitHub: https://github.com/zenbase-ai/llml

Would love to hear if others have faced similar prompt engineering challenges and how you've solved them!

Ask HN: How is the tech scene in LA?

1•asdev•31s ago•0 comments

Wutopia Lab designs bookshop in China to resemble inside of teapot

https://www.dezeen.com/2025/03/01/wutopia-lab-ceramic-pages-bookshop/
1•neom•2m ago•0 comments

CalyxOS Community update – our progress after the release of Android 16

https://calyxos.org/news/2025/06/26/community-update-android-16/
1•pabs3•9m ago•0 comments

Can Tinygrad Win?

https://geohot.github.io//blog/jekyll/update/2025/07/06/can-tinygrad-win.html
1•_hark•10m ago•0 comments

Jack Dorsey Releases BitChat: Encrypted Messaging via Bluetooth LE Mesh

https://github.com/jackjackbits/bitchat
4•ananddtyagi•16m ago•0 comments

There's a COMPUTER inside my DS flashcart [video]

https://www.youtube.com/watch?v=uq0pJmd7GAA
2•surprisetalk•17m ago•0 comments

Can Digital Poison Corrupt the Algorithm?

https://hackaday.com/2025/06/27/can-digital-poison-corrupt-the-algorithm/
1•gnabgib•18m ago•0 comments

Secret Cellular Phone Numbers

https://computer.rip/2025-07-06-secret-cellular-phone-numbers.html
2•zdw•19m ago•0 comments

MCP Generator

https://liblab.com/blog/mcp-generator
2•sagivo•23m ago•0 comments

China Is Quickly Eroding America's Lead in the Global AI Race

https://www.msn.com/en-us/money/markets/china-is-quickly-eroding-america-s-lead-in-the-global-ai-race/ar-AA1HNoP4
3•BiraIgnacio•25m ago•0 comments

Show HN: Modernized File Manager and Program Manager from Windows 3.x

https://github.com/brianluft/heirloom
2•electroly•26m ago•0 comments

Where are the GenZ multi millionaires and billionaires?

1•moneyhungry•32m ago•1 comments

China Has Paid a High Price for Its Dominance in Rare Earths

https://www.nytimes.com/2025/07/05/business/china-rare-earth-environment.html
2•NN88•32m ago•1 comments

Swedish Campground: "There are too many Apples on the screen!"

https://www.folklore.org/Swedish_Campground.html
3•CharlesW•32m ago•0 comments

What Can We Learn from Estonia?

https://www.statecraft.pub/p/how-to-digitize-the-government
1•atlasunshrugged•33m ago•0 comments

State Digital Transformation in Ukraine: 2019–2024 Review

https://voxukraine.org/en/state-digital-transformation-in-ukraine-2019-2024-review
1•atlasunshrugged•34m ago•0 comments

Researchers seek to influence peer review with hidden AI prompts

https://techcrunch.com/2025/07/06/researchers-seek-to-influence-peer-review-with-hidden-ai-prompts/
2•tagawa•34m ago•0 comments

Hey Siri, Time for That Lobotomy

https://spyglass.org/siri-chatgpt-claude/
1•bentocorp•36m ago•0 comments

Show HN: uvtarget – a helpful utility to manage Python in CMake, powered by uv

https://github.com/basis-robotics/uvtarget
2•a_t48•37m ago•0 comments

Adjustable Spring mechanism

https://www.youtube.com/watch?v=ZbpacL9NOdM
1•downboots•38m ago•0 comments

At least 36 new tech unicorns were minted in 2025 so far

https://techcrunch.com/2025/07/06/7-new-tech-unicorns-were-minted-in-2025-so-far/
1•bentocorp•40m ago•0 comments

Activision takes Call of Duty: WWII offline after reports of RCE exploits

https://www.tomshardware.com/video-games/pc-gaming/activision-takes-call-of-duty-wwii-offline-after-hackers-apparently-disrupted-the-game-with-rce-exploits-malicious-code-wreaks-havoc-on-pc-gamers-as-bad-actors-take-complete-control-of-your-computer
3•andrecarini•48m ago•0 comments

As Drones Spot Sharks, New York Beaches Are Shut Down

https://www.nytimes.com/2025/07/06/nyregion/shark-sightings-new-york-beaches-drones.html
2•geox•53m ago•0 comments

Optimizing PHP Apps in Dokku

https://aaron.com.es/blog/optimizing-php-apps-in-dokku/
1•chilipepperhott•55m ago•0 comments

PydanticPrompt: A simple library to document Pydantic models for LLMs

https://github.com/OpenAdaptAI/PydanticPrompt
1•abrichr•55m ago•0 comments

Show HN: Bottomless Storage for Agent Memory

https://www.acceleratedcloudstorage.com
1•obitoACS•1h ago•0 comments

"Do not highlight any negatives"

https://www.google.com/search?q=%22do+not+highlight+any+negatives%22+site%3Aarxiv.org
8•bgc•1h ago•2 comments

Centaur: A Controversial Leap Towards Simulating Human Cognition

https://insidescientific.com/centaur-a-controversial-leap-towards-simulating-human-cognition/
4•CharlesW•1h ago•0 comments

Russ Cox solves AoC 2021 Day 24 using Go in Acme [Compiler Analysis] [video]

https://www.youtube.com/watch?v=hmq6veCFo0Y
1•todsacerdoti•1h ago•0 comments

Intelligent Recommendation Engines with Agents

https://www.mlwhiz.com/p/genai-series-beyond-basic-rag-building
1•ai_unwrapped•1h ago•0 comments