惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Latest
Security Latest
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
量子位
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tor Project blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
T
Threatpost
T
Tenable Blog
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
C
Cisco Blogs
H
Heimdal Security Blog
Attack and Defense Labs
Attack and Defense Labs
A
About on SuperTechFans
Last Week in AI
Last Week in AI
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
I
Intezer
V
V2EX
Cyberwarzone
Cyberwarzone
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog RSS Feed
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
PCI Perspectives
PCI Perspectives
P
Privacy International News Feed
D
Docker

Synthesist in the Shell — A blog by Linghao Zhang

A Taxonomy Is a Theory of What Differences Matter Evolving Memory Systems: An Eval-First Approach Memory Systems Are Evolved, Not Designed Code as Config: The Start of Software Speciation The Bespoke Flywheel The Negative Space of AI Memory My 2025 Games of the Year My 2025 Games of the Year Why You Should Probably Work on AI Engineering AI Assisted System Design Interview Prep Hotel California Hotel California How To Be Great 101 Why is ML Runtime Infra So Hard Naming Matters: DRI vs. Owner in Software Projects Becoming a Staff Engineer Demystifying TLMs Learnings as a Tech Lead Notes: Staff Engineer Self Awareness with Tools Editing Technical Direction Rethinking Pessimism Superficial Similarity Grow @ Google 03: 文档意识与培养新人 我的时间管理系统 Notes: A Philosophy of Software Design 「程序员」和「软件工程师」是一回事吗? Grow @ Google 02: 「能用就行」还远远不够 Excerpts from Permanent Records David Perell 关于在线写作的建议 Grow @ Google 01: Noogler 成长的必经之痛 Excerpts from Blindsight 过去这五年,我学到了什么 利器访谈:创造者和他们的工具 Notes: The Effective Engineer 过去这五年 Notes: Steven Pinker on Linguistics, Style and Writing Notes: Programming Beyond Practices 如何提高英语水平 DIY 留学申请全攻略 Notes: Alistair Croll on Lean Analytics and Growth Hacking 初心 Notes: How Technology is Hijacking Your Mind 如何备考 TOEFL/GRE Learning How to Learn 课程笔记
Lessons Learned Building LLM Applications
2024-11-16 · via Synthesist in the Shell — A blog by Linghao Zhang

In my last role, I spent about a year building Conversational Analytics, an LLM-powered application that lets you ask natural language questions about your data and get insights. I've learned a few lessons along the way that I believe to be still very relevant to anybody building 2B/2C products in this space. Buckle up!

Start With Prompt Engineering and Evals

Prompt engineering, typically with simple in-context learning techniques such as a handful of few-shot examples, can get you very far in a very short amount of time.

Everybody on the team should do some prompt engineering. It has an incredibly low barrier to entry: Anybody from engineers to PMs and designers to executives can play with prompts against a state-of-the-art foundational model with almost 0 cost and 0 setup. It's great for exploring what can be achieved given the current model capabilities and creating demos to secure buy-in for the product vision. In a sense, it democratizes feasibility studies -- if a prompt works well for a few test cases, from that "happy path" we know that it's at least not a totally impossible idea.

As you make progress, though, you likely need to move beyond simple prompt engineering and bring in more advanced techniques such as RAG, agentic reasoning, fine-tuning, etc. The possibilities are endless and it's especially challenging to navigate now given all the hype. How do you pick the winning approach? Like the common wisdom says: you can't improve what you can't measure -- you need high-quality evaluation datasets with associated tooling and processes.

Make no mistake: While I'm writing about evals after prompt engineering, you should prioritize both from day 1. Creating high-quality datasets for a specific problem domain is not an easy task but there are existing practices to follow. It's usually a bootstrapping process: You start with a handful of manually created samples (they can be sourced from initial prompt engineering efforts) and augment that with a number of synthetic techniques such as asking LLMs to rewrite them into multiple alternatives. Then you can bring in humans in the loop which in turn gives you more and better samples to play with. Many companies inevitably ended up paying external vendors for such data labeling and curation but even that typically requires domain experts to work closely with the vendors to define guidelines and ensure quality of delivered data. Read more about high-quality human data in this brilliant write-up by Lilian Weng.

Maximize for Iteration Velocity

One of the most humbling lessons from working in this space is that many of our pre-existing assumptions will be constantly challenged and disproven. After all, it's a paradigm shift. Often, after the initial "anybody can engineer a prompt that makes a good demo" phase, it becomes difficult to predict what will or will not work to improve the quality of LLM responses further. Sure, there are general directions and proven techniques you can follow from academic and industry. But for your specific use cases, you won't know for sure until you've tried them.

Therefore, in addition to prioritizing evals, you need to relentlessly optimize for iteration velocity. Make sure that everybody on the team is set up to rapidly try news ideas and run evals to validate them, be it simple prompt changes, building an entirely new API/pipeline to feed additional context to the model, or making a new LoRA fine-tuned model with latest data specifically curated for a top loss pattern.

That's the goal. Realizing that and getting aligned behind that already gets you more than halfway there -- it doesn't require rocket science or LLM alchemy, just good old software engineering with a specific goal in mind. You'll run into some common challenges like development-prod skew and version-controlling prompts and datasets. None are hard to overcome though.

A Demo Is Very Far From a Product

It can be trivial to create an impressive demo with LLMs, but the gap between that and a real product is even larger than that in traditional software domains. The LLM aspect is only one of the puzzles to true innovation and success. I would argue that eventually building an LLM application is mostly about two things: data and guardrails.

I've talked enough about data in this post. To reiterate, while new foundational models and techniques for applying them continue to come out, expect to throw away much of your existing prompts and workflows. What remains are the high-quality datasets tailored to your use cases. Without them, even something like upgrading to a newer version of the foundational model will be painful as prompts typically need to be overhauled.

Guardrails are various UX patterns, safety filters, pre-/post-processing, etc put in place of an LLM application to make sure that the unpredictable nature of LLMs do not create inaccurate or harmful responses and ruin the product experience. For example, hallucination is a common stubborn issue. In an application leveraging text-to-SQL generation, a typical post-processing step is to parse the generated SQL and fix e.g. a hallucinated column reference by replacing it with an existing column which has the smallest edit distance. One interesting thing here is that you could also use LLM-based techniques to fix such issues, e.g. by asking the model to self correct. But a general lesson is to prefer a non-LLM solution if it achieves similar performance -- the fewer LLM workflows in your system, the easier it is to manage the complexity and cost.

In the space of 2B/2C products (as opposed to e.g. developer facing products like LLM APIs), data and guardrails make all the difference. They certainly take a lot of funding and execution to build. But they are the real assets that empower a polished, differentiated product.

An Initial Product Can Be Far From Product-Market Fit

I'll keep this final section short and speculative because at this point very few LLM applications can claim they've reached PMF (certainly not Conversational Analytics).

Just like in applying traditional ML models, issues of user trust and control come into play with LLM applications once they get into the hands of users. One question is how the product should evolve based on user feedback. LLMs excel in some areas but can struggle in others. For example, when creativity is desired, LLMs can take the center stage; but a more demanding factuality requirement will likely place the human in the driver's seat. Your initial iteration might not strike the right balance in how much control is given to the user and around which is the UX designed. So conduct plenty of user studies especially at early stages to help guide the product direction.

Interestingly, if you provide enough value, users might adjust to new usage patterns. For instance, seeing higher SQL generation quality when the database schema is rich with annotations might motivate users to provide such enriched context more proactively. It would not have been easy to push users to do that otherwise. Personally I think this kind of emergent phenomenon and the learnings that come with it is what makes working in this space so rewarding :) What do you think?

Resources