GEMINI WORKSPACE LAB
Gemini AI & Workspace Automation
Repair an invoice extraction, confirm it against the document, and approve a simulated spreadsheet row.
Help & starter walkthrough
Start here
Learn how to check data extracted from a document before approving it for a spreadsheet. The opening response is prerecorded, so the exercise works without a Gemini key.
- Find the type errorChoose Invoice extraction and click Load invalid fixture, then Validate JSON. Expect
$.total must be a number.Find the quote marks around"113"in Structured JSON. - Repair and check the sourceChange
"total": "113"to"total": 113. Click Validate JSON. Then compare the total, currency, and evidence withTotal: 113.00 CADin the source. - Review and approveClick Open review. Enter
Workshop reviewerandChecked total and currency against the invoicein the reviewer and reason fields. Check I checked the source and supporting excerpt. Click Approve record, then Add to simulated sheet. Expect a row with113andCAD.
Detailed walkthrough, examples, and troubleshooting
Practice rejection and uncertainty
- Load the reference invoice again. Keep
totalnumeric but change it to100. Click Validate JSON. A numeric subtotal can pass the schema even though the source says the final total is 113. - Click Open review, enter a reviewer and the reason
Subtotal used instead of final total, and click Reject record. The simulated sheet gains no row. Inspect the decision in Review audit. - Try replacing
evidencewithPayment made yesterday. Validate again. The schema may pass, but the lab flags that the exact excerpt is absent.
Compare evidence and experiment with prompts
- Open Retrieval & evaluation. Search for
total CADand click Rank source chunks. Read the text offsets and matching words. - Click Compare fixtures and current response. Compare each row’s schema result, exact field matches, and excerpt presence. Read the document yourself before deciding whether an excerpt supports a claim.
- Return to Extraction lab. Change the extraction prompt to
Use the tax-inclusive total, not the subtotal.and click Save prompt version. In fixture mode, changing the prompt does not generate a new response. - Open Lessons & projects and search for Compare shape with evidence. Try the exercise with a second template such as Policy question answering.
Save, export, or try a live request
- Open Export & live setup → Save locally to keep the draft in this browser. The draft requires fresh review after reload. Download project JSON also includes your source text and audit, so review the file before sharing it.
- Choose
Code.gsorSETUP.mdunder Generated file, then click Download Apps Script ZIP to get the schema, review workflow, and instructions for an authorized Google test account. The ZIP excludes your pasted document. - Open Optional live Gemini request only if the site operator has configured it. Use fictional text, enter the supplied operator key, check the permission box, and click Request live response. Validate and review the returned candidate before adding any row.
If a button is unavailable
- Open review is disabled: repair any JSON errors and validate again.
- Approve record is disabled: open review and check that the evidence appears exactly in the current document. Enter a reviewer and reason and confirm the evidence check.
- Add to simulated sheet is disabled: approve first. Editing the prompt, document, or response sends the current record back to Draft.
Document and prompt
Help · Document and prompt
Source document is the evidence you will check. System instructions, Extraction prompt, and Example or constraints describe the requested work. Save prompt version stores the wording. Text and Markdown import are local. The optional live request is a separate action.
Response and review
Help · Response and review
Structured JSON is the candidate record. Validate JSON checks the format and field types. Open review lets you check source accuracy. Enter reviewer and reason, approve or reject, then use Add to simulated sheet to complete an approved record. Editing returns the candidate to Draft.
Validation rules
Draft
Simulated spreadsheet
Help · Simulated spreadsheet and audit
The sheet shows approved records after you explicitly add them. The audit lists validation and review decisions. Compare the two when testing a rejection: the audit records it and the sheet does not gain a row.
Review audit
Local keyword retrieval
Help · Retrieval and evaluation
Rank source chunks finds text with matching words. Read the offsets and verify which passage supports the claim. Compare fixtures and current response shows schema checks, exact field matches against the reference, and whether the evidence text appears. Read the source for factual accuracy.
Fixture evaluation
Schema compliance, exact matching on authored fields, and excerpt presence are measured separately. Review semantic support yourself.
Learning library
Help · Lessons and projects
Open a lesson to get a prediction and task. Try Compare shape with evidence after the invoice exercise. Templates switch the document, fields and recorded answer together. Use the approved policy exercise to practice distinguishing current and archived information.
Estimated cost
Use hypothetical prices per million tokens and an example request budget.
Help · Cost and AI coach
Cost uses hypothetical input and output prices per million tokens. Change one input at a time and compare estimates. The AI coach generates editable guidance to copy. Neither action contacts Gemini.
AI coach
Apps Script project
Source ZIP includes the configured workflow schema, sample task and setup steps. It does not include the pasted source document, edited prompt, response, or credentials.
Help · Export and live setup
Download Apps Script ZIP gives the reviewed Sheets workflow and setup files. Download project JSON includes your saved document and response, so check it before sharing. Live requests require a configured server and an explicit send action. Use the fictional sample for testing.
Optional live Gemini request
This sends the current source and prompt to Gemini if the site operator has configured the PHP proxy. Use fictional data.
Practice structured AI workflows
Review a proposed structure and its evidence before writing approved data.
Apps Script learning path · Interactive guides