Local AI
Local AI brings private AI text generation and on-device document extraction into Excel. It runs Large Language Models and Vision-Language models locally on your device using WebGPU, so your prompts, document uploads, and workbook data stay 100% private and offline on your computer.
Use it to generate text, summarize columns, translate fields, rewrite text, or extract structured data from receipts and invoices directly into Excel tables without API keys, subscriptions, or external cloud requests.
Web Demo
No installation or Excel account required. Explore the pre-configured interactive model directly in your browser:
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.
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 |
OCR Extraction
Extracts structured fields from invoice and receipt files without ever sending your documents to an external server or cloud API.
System Requirement: OCR Extraction requires WebGPU to process documents. If your browser or device does not support WebGPU, the OCR Extraction tab will not be shown in the taskpane.
How to Use OCR Extraction
- Switch to OCR Extraction: Click the OCR Extraction icon (indicated by a document scan icon) at the top of the Local AI taskpane.
- Upload your Document: Drag and drop a PDF page or image file (PNG, JPEG, WebP) into the upload area, or click to browse.
- Select the Document Type: Use the dropdown to select either Invoice or Receipt. This determines which prebuilt local extraction model and schema to apply.
- Extract Data: Click Extract.
- Note: The first time you run an extraction, the model will download and initialize in your browser (approx. 500 MB). Subsequent extractions will run much faster from the local browser cache.
- Review & Correct: The taskpane displays a split-screen review panel. You can inspect the extracted values side-by-side with your document, and type directly into any field to fix inaccuracies.
- Insert into Excel: Click Insert to Excel. The add-in automatically creates a clean, formatted Excel Table on a dedicated worksheet (
OCR InvoicesorOCR Receipts) and writes the reviewed data.
Prebuilt Extraction Fields
OCR Extraction uses specialized Key Information Extraction (KIE) schemas to ensure accurate mapping:
| Document Type | Target Excel Table | Worksheet Name | Extracted Fields |
|---|---|---|---|
| Invoice | OcrInvoices | OCR Invoices | Vendor Name, Customer Name, Invoice Number, Invoice Date, Due Date, Currency, Subtotal, Total Tax, Invoice Total, Amount Due |
| Receipt | OcrReceipts | OCR Receipts | Merchant Name, Transaction Date, Payment Method, Currency, Subtotal, Tax, Tip, Total |
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 - 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_promptrather than appending them in the main prompt cell.
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 a common spreadsheet pattern: summarization.
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.
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.
Clearing Cached Models
If you want to free up local disk space or remove previously downloaded models, click the Clear Cached Models button at the very bottom of the Help & Support pane. This will safely delete all model files from your browser's local cache storage without affecting any other site data or Excel Online settings.
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.
Troubleshooting
The formula shows #NAME?
Make sure the taskpane is available and the function name is =LOCAL.AI(...).
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.AI(A2, 0, 100, "Translate to French"))
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.
The OCR Extraction icon is missing or not visible
The OCR Extraction icon is hidden automatically if WebGPU is not supported by your browser or hardware. To enable WebGPU support:
- Make sure you are using a modern browser with WebGPU support enabled (e.g., Google Chrome, Microsoft Edge, or Opera).
- Verify that Hardware Acceleration is enabled in your browser settings (usually under Settings > System or Performance).
- Ensure your graphics card drivers are up to date.
Can I run =LOCAL.AI formulas without WebGPU?
Yes. Unlike OCR Extraction (which strictly requires WebGPU), the =LOCAL.AI cell formula will fall back to executing on your CPU if WebGPU is unavailable. However, CPU-based execution is extremely slow and is only recommended for very light tasks using the lightweight fallback model, SmolLM2-135M.
FAQ
Does my data go to the cloud?
No. Both text generation and OCR/document extraction happen 100% locally on your device. Your uploaded invoices, receipts, prompts, and workbook data are never sent to external servers or cloud APIs.
Why is the first run slower than later runs?
The model files (including the vision/OCR models) must download, initialize, and optimize themselves in your browser cache the very first time you use them. Subsequent runs are much faster because the models run directly from local browser storage.
Can I use Local AI and OCR offline?
Yes. Once a model (such as the text generator or the OCR vision model) has been downloaded and cached, you can perform text generation and document extractions completely offline.
What hardware do I need?
- For OCR Extraction: A browser with WebGPU support and a compatible graphics card is strictly required. The OCR Extraction icon is completely hidden if WebGPU support is not detected on your device or browser.
- For
=LOCAL.AIformulas: A WebGPU-compatible graphics card is highly recommended for optimal speed. If WebGPU is not supported or is disabled, the formula will fall back to executing on your CPU. However, CPU execution runs extremely slowly and is only recommended for very light tasks with the small fallback model,SmolLM2-135M.
Which document formats are supported by OCR Extraction?
You can upload PDF files (the first page will be rendered for extraction) as well as common image formats such as PNG, JPEG, and WebP.
Can I ask for structured output?
Yes. When using the =LOCAL.AI formula, you can ask the model for a markdown table, a bulleted list, or one item per line. For invoices and receipts, OCR Extraction automatically handles structured extraction into clean Excel tables for you.