Local AI
Local AI brings private AI text generation into Excel. It runs Large Language Models locally on your device using WebGPU, so your prompts and workbook data stay on your computer after the model is downloaded.
Use it to summarize text columns, extract fields from messy notes, classify row-level comments, and flag rows for review without API keys or usage tokens.
Quick Start
1. Open the taskpane
After installation, click Local AI in the Excel Home ribbon. On first launch, the add-in shows a welcome screen from which you can select the LOCAL.AI function.
2. Insert a function
Use the taskpane to insert the LOCAL.AI function into cells as =LOCAL.AI(...) or simply by typing =LOCAL.AI in a cell or the formula bar.
3. Insert result instead of formula
If you don't need to update the output every time the workbook recalculates, insert the result as a static value instead of a formula by checking the "Insert result instead of formula" option in the taskpane.
Function Reference
LOCAL.AI
Generates text from a prompt using a local AI model.
Syntax
=LOCAL.AI(prompt, [temperature], [max_tokens], [sys_prompt], [model])
| Parameter | Required | Type | Default used when omitted | Description |
|---|---|---|---|---|
prompt | Yes | Text | - | The cell value or text to send as the user message. |
temperature | No | Number | 0 | Controls randomness. Lower values are more deterministic. |
max_tokens | No | Number | 100 | Maximum number of tokens to generate. |
sys_prompt | No | Text | You are a helpful AI assistant. | Sets the model's role or behavior. |
model | No | Text | Ternary-Bonsai-1.7B | Selects which local model to use. |
The output is returned as a normal cell value. prompt is passed to the model as the user message. sys_prompt is passed as the system message, so it is the best place for stable instructions such as the task, output format, and whether extra text is allowed.
LOCAL.CLASSIFY
Select the best category from a list for the provided text.
Syntax
=LOCAL.CLASSIFY(text, categories)
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
text | Yes | Any | - | The text to classify. |
categories | Yes | Any | - | List of categories. Use a 1-column range, a 2-column range (column 1: label, column 2: detailed description), or a comma-separated string. |
LOCAL.CLASSIFY uses the built-in GTE Reranker ModernBERT classification engine. The model is fixed for this function and is not exposed as a formula parameter.
For best results, put categories in a two-column range. The first column is the exact label LOCAL.CLASSIFY should return. The second column is a plain-language description that explains when that label should be chosen. Descriptions are especially helpful when labels overlap, are short, or use internal business terms.
Example category table:
| Label | Description |
|---|---|
| Bug | The user reports an error, crash, broken workflow, incorrect result, or unexpected behavior. |
| Billing | The user asks about invoices, charges, plans, payments, refunds, or subscription pricing. |
| Account | The user needs help with login, access, password reset, permissions, or profile settings. |
If the labels are simple and obvious, a one-column range such as C2:C6 or a comma-separated list is fine. If the categories need context, use a two-column range such as C2:D6 and fill the formula down:
=LOCAL.CLASSIFY(A2, $C$2:$D$6)
LOCAL.EXTRACT
Extract specific information from text as a list.
Syntax
=LOCAL.EXTRACT(text, extract_type, [model])
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
text | Yes | Text | - | The text to extract from. |
extract_type | Yes | Text | - | What to extract (e.g., 'emails', 'dates'). |
model | No | Text | Ternary-Bonsai-1.7B | Selects the local model. |
Model options
| Display name | Approx. disk | Approx. RAM | Best for |
|---|---|---|---|
| Ternary-Bonsai-1.7B | ~500 MB | ~2 GB | Better reasoning and richer text |
| Ternary-Bonsai-4B | ~1 GB | ~4 GB | Harder prompts and more detailed responses |
| Qwen3.5-0.8B | ~500 MB | ~2 GB | Balanced quality and speed |
| LFM2.5-350M | ~250 MB | ~1 GB | Fast, lightweight tasks |
Migration Notes
If you used the earlier BOARDFLARE.GPT version, note these changes:
- The function name is now
LOCAL.AI - The old
optionsargument has been replaced by separate optional arguments - Model selection is explicit through the
modelargument for generation-based functions;LOCAL.CLASSIFYuses a fixed local classifier - The add-in is positioned as a local, privacy-first experience
Examples & Scenarios
Local AI works best when you give it a clear job and enough workbook context.
Tip: Use direct cell references for the changing row content. For open-ended generation with
LOCAL.AI, put stable instructions insys_prompt; for common spreadsheet jobs, prefer the specializedLOCAL.CLASSIFYandLOCAL.EXTRACTfunctions.
The expected results below show the kind of output to aim for. Local model wording can vary for generation tasks, so focus on whether the result follows the requested shape.
The examples cover four common spreadsheet patterns: summarization, classification, extraction, and validation.
1. Summarize survey responses by row
Survey exports often land in Excel with one long free-text response per row. Local AI can create a short summary column while keeping the original comments local.
| Cell | Survey response | Formula Output |
|---|---|---|
A2 | The portal is easy to use once I find the right page, but the menu labels are confusing and I usually search instead of browsing. | The portal works, but navigation labels are confusing. |
A3 | The monthly report has the numbers I need, but it takes too long to load and sometimes freezes when I filter by region. | The monthly report has useful data but loads slowly and freezes when filtered. |
A4 | I like getting reminders before the deadline. The only issue is that the reminder links open the wrong form about half the time. | Reminders are helpful, but their links often open the wrong form. |
Formula
=LOCAL.AI(A2, 0, 70, "Summarize the survey response provided by the user in one short sentence. Preserve the main issue or request. Do not return any other text.")
Use this when: You need a readable helper column before grouping, filtering, or reviewing hundreds of open-ended survey comments.
2. Categorize expense descriptions from a bank export
Bank and card exports often have merchant text that is readable to a person but awkward for formulas. Use a two-column category table when the labels need definitions, then feed the returned labels into pivots and charts.
| Cell | Transaction description | Formula Output |
|---|---|---|
A2 | SQ *BLUE BOTTLE COFFEE 427 SAN FRANCISCO CA | Meals |
A3 | ADOBE *CREATIVE CLOUD 800-833-6687 CA | Software |
A4 | LYFT *RIDE WED 8:42PM SAN FRANCISCO CA | Travel |
A5 | USPS PO 056873 BERKELEY CA | Shipping |
Formula
=LOCAL.CLASSIFY(A2, $F$2:$G$7)
Example category table in F2:G7:
| Label | Description |
|---|---|
| Meals | Restaurants, cafes, coffee shops, catering, and food purchased while working or traveling. |
| Software | SaaS subscriptions, cloud software, design tools, developer tools, and app marketplaces. |
| Travel | Rideshare, flights, hotels, parking, public transit, taxis, rental cars, and mileage. |
| Shipping | Postage, courier services, freight, package delivery, and mailing supplies. |
| Office Supplies | Stationery, paper, printer supplies, office equipment, and desk accessories. |
| Other | Anything that does not clearly fit one of the listed business expense categories. |
Use this when: You are cleaning expense exports before review. Keep the result as a suggested category and spot-check it before posting or reimbursing anything.
3. Extract invoice numbers from pasted text
Invoices, statements, and remittance notes often arrive as pasted text in a worksheet. LOCAL.EXTRACT can pull a requested kind of value from each note without sending the document text to a cloud AI service.
| Cell | Pasted invoice text | Formula Output |
|---|---|---|
A2 | Invoice 8842 from Northwind Traders, dated Apr 12, due May 12. Total due is $4,812.50 for implementation support. | 8842 |
A3 | Contoso Ltd statement shows INV-10391, balance 980.00, payment requested by 2026-05-31. | INV-10391 |
A4 | Receipt from Alpine Ski House for annual subscription. No invoice number listed. Amount paid: $240. |
Formula
=LOCAL.EXTRACT(A2, "Invoice number")
Use this when: You are preparing AP, AR, or reconciliation workbooks from copied invoice or remittance text and need structured review fields.
4. Validate rows before review
Validation can be framed as classification: the model selects the review status that best matches the row context. Treat the result as a review aid, not an accounting control.
| Cell | Reconciliation row | Formula Output |
|---|---|---|
A2 | Bank: 1,250.00 | Vendor: Comcast | Date: Apr 30 | OK |
A3 | Bank: 890.00 | Vendor: Contoso Ltd | Date: Apr 28 | Review amount mismatch |
A4 | Bank: $410.00 | Ledger: blank | Vendor: Adobe | Date: Apr 15 | Review missing ledger amount |
Formula
=LOCAL.CLASSIFY(TEXTJOIN(" | ", TRUE, A2:E2), "OK, Review amount mismatch, Review missing ledger amount, Review missing vendor, Review date issue")
Use this when: You want a helper column that highlights rows a person should inspect first in a reconciliation, AP review, or month-end workbook.
Tips & Best Practices
Start with the default model
The default model balances local performance with stronger extraction and general text quality. Move to a larger model only when you need better quality or more complex reasoning.
Put reusable instructions in sys_prompt
Local AI responds best when the cell value is the user message and the repeated instructions live in sys_prompt.
Good:
=LOCAL.AI(A2, 0, 80, "Summarize the note provided by the user in one sentence. Do not return any other text.")
Less reusable:
=LOCAL.AI("Summarize this note in one sentence: " & A2)
For workbooks you will reuse, put the sys_prompt in a separate cell and reference it from the formula. For example, put the instructions in F1, then fill this formula down:
=LOCAL.AI(A2, 0, 80, $F$1)
Use lower temperature for repeatable work
0.0to0.2for summaries and other repeatableLOCAL.AItasks0.5for balanced output0.7or higher for brainstorming
Insert results when the output is final
AI formulas can be expensive to recalculate. If you are happy with the answer, paste it as a static value.
Expect a slower first run
The first use of a model downloads it and prepares it for local execution. After that, the model is cached in the browser and runs faster.
Keep outputs cell-sized
Choose scenarios where the result naturally belongs in one worksheet cell. When using LOCAL.AI, set max_tokens close to the longest useful answer; a one-sentence summary may need 70 to 100 tokens.
Using LAMBDA
Using a LAMBDA function lets you create a custom reusable tool that simplifies your formulas and centralizes your category table in one place. This makes your workbooks easier to maintain and more accessible for others to use without seeing complex underlying logic.
Example:
=LAMBDA(
ticket,
LOCAL.CLASSIFY(
ticket,
TicketCategories
)
)
Name the two-column category table TicketCategories, then name this LAMBDA TICKETTYPE using the Excel Name Manager. You can then fill down =TICKETTYPE(A2) throughout your sheet.
With Array Values
For classification, keep labels and descriptions in worksheet cells and pass the range directly to LOCAL.CLASSIFY. This keeps your category list in sync as you update or expand your tags.
Example: If C4:D6 contains labels and descriptions:
=LOCAL.CLASSIFY(C3, C4:D6)
Troubleshooting
The formula shows #NAME?
Make sure the taskpane is available and the function name starts with LOCAL., such as =LOCAL.AI(...), =LOCAL.CLASSIFY(...), or =LOCAL.EXTRACT(...).
The first response is slow
That usually means the model is downloading or being initialized. Leave the taskpane open and try again after the first run completes.
The output is too creative or too rigid
Adjust temperature.
- Lower it for stricter, more consistent responses
- Raise it for idea generation and open-ended writing
I want a different style or role
Use sys_prompt to set the model's behavior.
Example:
=LOCAL.AI(A2, 0.2, 120, "Summarize the note provided by the user as a concise review comment. Preserve factual details. Do not return any other text.")
Blank rows are generating output
Wrap the formula in IF so empty cells stay empty.
Example:
=IF(A2="","",LOCAL.CLASSIFY(A2, "Bug, Billing, Account, Feature Request, How-to, Other"))
The model is too large for my machine
Use a smaller model like LFM2.5-350M or Qwen3.5-0.8B. Larger models need more memory and usually run more slowly.
FAQ
Does my data go to the cloud?
No. The text generation happens locally on your device after the model is downloaded.
Why is the first run slower than later runs?
The model has to download, initialize, and optimize itself the first time you use it. Later runs are faster because the model is cached locally.
Can I use Local AI offline?
Yes, after the model has been downloaded and cached. You still need the initial download the first time you use each model.
What hardware do I need?
A browser with WebGPU support and enough memory for the selected model. Smaller models are better for lighter hardware.
Can I ask for structured output?
Yes. Ask for a markdown table, a bulleted list, or one item per line when you want results that are easy to paste into Excel.