AI

Instead of fine-tuning an LLM as a first approach, try prompt architecting instead

Comment

digitally generated image of a brain-shaped console with buttons and knobs
Image Credits: Jorge Greuel (opens in a new window) / Getty Images

Victoria Albrecht

Contributor

Victoria Albrecht is co-founder and CEO of Springbok AI.

Amid the generative AI eruption, innovation directors are bolstering their business’ IT department in pursuit of customized chatbots or LLMs. They want ChatGPT but with domain-specific information underpinning vast functionality, data security and compliance, and improved accuracy and relevance.

The question often arises: Should they build an LLM from scratch, or fine-tune an existing one with their own data? For the majority of companies, both options are impractical. Here’s why.

TL;DR: Given the right sequence of prompts, LLMs are remarkably smart at bending to your will. The LLM itself or its training data need not be modified in order to tailor it to specific data or domain information.

Exhausting efforts in constructing a comprehensive “prompt architecture” is advised before considering more costly alternatives. This approach is designed to maximize the value extracted from a variety of prompts, enhancing API-powered tools.

If this proves inadequate (a minority of cases), then a fine-tuning process (which is often more costly due to the data prep involved) might be considered. Building one from scratch is almost always out of the question.

The sought-after outcome is finding a way to leverage your existing documents to create tailored solutions that accurately, swiftly, and securely automate the execution of frequent tasks or the answering of frequent queries. Prompt architecture stands out as the most efficient and cost-effective path to achieve this.

What’s the difference between prompt architecting and fine-tuning?

If you are considering prompt architecting, you have likely already explored the concept of fine-tuning. Here is the key distinction between the two:

While fine-tuning involves modifying the underlying foundational LLM, prompt architecting does not.

Fine-tuning is a substantial endeavor that entails retraining a segment of an LLM with a large new dataset — ideally your proprietary dataset. This process imbues the LLM with domain-specific knowledge, attempting to tailor it to your industry and business context.

In contrast, prompt architecting involves leveraging existing LLMs without modifying the model itself or its training data. Instead, it combines a complex and cleverly engineered series of prompts to deliver consistent output.

Fine-tuning is appropriate for companies with the most stringent data privacy requirements (e.g., banks)

On the surface, fine-tuning seems efficient: You skip the ordeal of building a new model and simply retrain an existing one with your own data.

Fine-tuning’s surprising hidden cost arises from acquiring the dataset and making it compatible with your LLM and your needs. In comparison, once the dataset is ready, the fine-tuning process (uploading your prepared data, covering the API usage and computing costs) is no drama.

Given the high costs, fine-tuning is recommended only when prompt architecting–based solutions have failed.

Not to mention, a robust prompt architecture is often necessary to make optimal use of the outputs of fine-tuning anyway.

When approaching technology partners for fine-tuning activities, inquire about dataset preparation expertise and comprehensive cost estimates. If they omit them, it should raise a red flag, as it could indicate an unreliable service or a lack of practical experience in handling this task.

Generally, valuable fine-tune cases should undergo a prompt architecture–based proof of concept stage before operational investment.

Build secure solutions tailored to your company’s data

Let’s jump into the example of a research tool: a solution that provides near-instant answers to questions relating to hundreds of documents. This tool can be accessible by employees via a web interface with enterprise-grade security controls and user management. It’s built using an API and tailored to your data and objectives through prompt architecting.

Users can pose questions like “Show me all conversations between Jane Doe and John Smith referencing ‘transaction,’” and the tool scans your documents to provide easily readable results. The system uses a careful system of retrieval mechanisms combined with intelligent prompts to scan through the lengthy text contained in the documents to produce a coherent response.

Dentons [a Springbok AI customer] recently introduced FleetAI: their proprietary ChatGPT version, and a legal industry first, for analyzing and querying uploaded legal documents.

Building a new LLM from scratch is no small task

If, to achieve the same outcomes, you were to build “your own LLM” from scratch, expect an uphill battle. This ambition is often misguided. It can cost at least $150 million and yield experimental outcomes. Aspiring to create a proprietary LLM often competes with established players like Meta, OpenAI, and Google, or the best university research departments.

The number of companies equipped to do this is probably only in the double digits worldwide. What executives usually mean by their “own LLM” is a secure LLM-powered solution tailored to their data. The pragmatic route for most executives seeking their “own LLM” involves solutions tailored to their data via fine-tuning or prompt architecting.

Prompt architecting basic best practices

First you need to create data flow and software architecture diagrams that represent the overall design of a solution, with analytics feedback mechanisms in place.

There should be guidelines for context-based text enhancement, with prompt templates and specified tone and length.

Then the architecture should be adapted to the chosen output mode, such as a dashboard, conversational interface, or template-based document.

Integration with additional data sources is made possible: databases for efficient data retrieval, Salesforce for CRM communication, and optical character recognition (OCR) capabilities for processing text from images or scanned documents.

Finally, output quality measures are implemented. When an output fails the criteria, the text is amended by a feedback loop. It checks for offensive language, inappropriate tone and length, and false information. Once the checks are passed, the message is sent to the user.

There is no guarantee that the LLM will not hallucinate or swerve offtrack. AI can never reach 100% accuracy. Nonetheless, these response accuracy checks strive to nip anomalous output in the bud.

Key takeaways

Innovation directors seek tailored chatbots and LLMs, facing the dilemma of building from scratch or fine-tuning. For most, both options are impractical.

LLMs are impressively adaptive through well-structured prompts. An exhaustive exploration of prompt architectures is recommended before more costly alternatives, especially given that a prompt architecture will be needed to achieve desired results even if you fine-tune or build a model.

More TechCrunch

Generative AI improvements are increasingly being made through data curation and collection — not architectural — improvements. Big Tech has an advantage.

AI training data has a price tag that only Big Tech can afford

Keeping up with an industry as fast-moving as AI is a tall order. So until an AI can do it for you, here’s a handy roundup of recent stories in the world…

This Week in AI: Can we (and could we ever) trust OpenAI?

Jasper Health, a cancer care platform startup, laid off a substantial part of its workforce, TechCrunch has learned.

General Catalyst-backed Jasper Health lays off staff

Live Nation says its Ticketmaster subsidiary was hacked. A hacker claims to be selling 560 million customer records.

Live Nation confirms Ticketmaster was hacked, says personal information stolen in data breach

Featured Article

Inside EV startup Fisker’s collapse: how the company crumbled under its founders’ whims

An autonomous pod. A solid-state battery-powered sports car. An electric pickup truck. A convertible grand tourer EV with up to 600 miles of range. A “fully connected mobility device” for young urban innovators to be built by Foxconn and priced under $30,000. The next Popemobile. Over the past eight years, famed vehicle designer Henrik Fisker…

15 hours ago
Inside EV startup Fisker’s collapse: how the company crumbled under its founders’ whims

Late Friday afternoon, a time window companies usually reserve for unflattering disclosures, AI startup Hugging Face said that its security team earlier this week detected “unauthorized access” to Spaces, Hugging…

Hugging Face says it detected ‘unauthorized access’ to its AI model hosting platform

Featured Article

Hacked, leaked, exposed: Why you should never use stalkerware apps

Using stalkerware is creepy, unethical, potentially illegal, and puts your data and that of your loved ones in danger.

16 hours ago
Hacked, leaked, exposed: Why you should never use stalkerware apps

The design brief was simple: each grind and dry cycle had to be completed before breakfast. Here’s how Mill made it happen.

Mill’s redesigned food waste bin really is faster and quieter than before

Google is embarrassed about its AI Overviews, too. After a deluge of dunks and memes over the past week, which cracked on the poor quality and outright misinformation that arose…

Google admits its AI Overviews need work, but we’re all helping it beta test

Welcome to Startups Weekly — Haje‘s weekly recap of everything you can’t miss from the world of startups. Sign up here to get it in your inbox every Friday. In…

Startups Weekly: Musk raises $6B for AI and the fintech dominoes are falling

The product, which ZeroMark calls a “fire control system,” has two components: a small computer that has sensors, like lidar and electro-optical, and a motorized buttstock.

a16z-backed ZeroMark wants to give soldiers guns that don’t miss against drones

The RAW Dating App aims to shake up the dating scheme by shedding the fake, TikTok-ified, heavily filtered photos and replacing them with a more genuine, unvarnished experience. The app…

Pitch Deck Teardown: RAW Dating App’s $3M angel deck

Yes, we’re calling it “ThreadsDeck” now. At least that’s the tag many are using to describe the new user interface for Instagram’s X competitor, Threads, which resembles the column-based format…

‘ThreadsDeck’ arrived just in time for the Trump verdict

Japanese crypto exchange DMM Bitcoin confirmed on Friday that it had been the victim of a hack resulting in the theft of 4,502.9 bitcoin, or about $305 million.  According to…

Hackers steal $305M from DMM Bitcoin crypto exchange

This is not a drill! Today marks the final day to secure your early-bird tickets for TechCrunch Disrupt 2024 at a significantly reduced rate. At midnight tonight, May 31, ticket…

Disrupt 2024 early-bird prices end at midnight

Instagram is testing a way for creators to experiment with reels without committing to having them displayed on their profiles, giving the social network a possible edge over TikTok and…

Instagram tests ‘trial reels’ that don’t display to a creator’s followers

U.S. federal regulators have requested more information from Zoox, Amazon’s self-driving unit, as part of an investigation into rear-end crash risks posed by unexpected braking. The National Highway Traffic Safety…

Feds tell Zoox to send more info about autonomous vehicles suddenly braking

You thought the hottest rap battle of the summer was between Kendrick Lamar and Drake. You were wrong. It’s between Canva and an enterprise CIO. At its Canva Create event…

Canva’s rap battle is part of a long legacy of Silicon Valley cringe

Voice cloning startup ElevenLabs introduced a new tool for users to generate sound effects through prompts today after announcing the project back in February.

ElevenLabs debuts AI-powered tool to generate sound effects

We caught up with Antler founder and CEO Magnus Grimeland about the startup scene in Asia, the current tech startup trends in the region and investment approaches during the rise…

VC firm Antler’s CEO says Asia presents ‘biggest opportunity’ in the world for growth

Temu is to face Europe’s strictest rules after being designated as a “very large online platform” under the Digital Services Act (DSA).

Chinese e-commerce marketplace Temu faces stricter EU rules as a ‘very large online platform’

Meta has been banned from launching features on Facebook and Instagram that would have collected data on voters in Spain using the social networks ahead of next month’s European Elections.…

Spain bans Meta from launching election features on Facebook, Instagram over privacy fears

Stripe, the world’s most valuable fintech startup, said on Friday that it will temporarily move to an invite-only model for new account sign-ups in India, calling the move “a tough…

Stripe curbs its India ambitions over regulatory situation

The 2024 election is likely to be the first in which faked audio and video of candidates is a serious factor. As campaigns warm up, voters should be aware: voice…

Voice cloning of political figures is still easy as pie

When Alex Ewing was a kid growing up in Purcell, Oklahoma, he knew how close he was to home based on which billboards he could see out the car window.…

OneScreen.ai brings startup ads to billboards and NYC’s subway

SpaceX’s massive Starship rocket could take to the skies for the fourth time on June 5, with the primary objective of evaluating the second stage’s reusable heat shield as the…

SpaceX sent Starship to orbit — the next launch will try to bring it back

Eric Lefkofsky knows the public listing rodeo well and is about to enter it for a fourth time. The serial entrepreneur, whose net worth is estimated at nearly $4 billion,…

Billionaire Groupon founder Eric Lefkofsky is back with another IPO: AI health tech Tempus

TechCrunch Disrupt showcases cutting-edge technology and innovation, and this year’s edition will not disappoint. Among thousands of insightful breakout session submissions for this year’s Audience Choice program, five breakout sessions…

You’ve spoken! Meet the Disrupt 2024 breakout session audience choice winners

Check Point is the latest security vendor to fix a vulnerability in its technology, which it sells to companies to protect their networks.

Zero-day flaw in Check Point VPNs is ‘extremely easy’ to exploit

Though Spotify never shared official numbers, it’s likely that Car Thing underperformed or was just not worth continued investment in today’s tighter economic market.

Spotify offers Car Thing refunds as it faces lawsuit over bricking the streaming device