AI Engineering
Deep dives into machine learning systems, vector search, embeddings, and production AI architectures — including practical Gemini API integration guides with tested code.
Tutorials (49)
-
FunctionGemma Flutter: On-Device Function Calling Guide
FunctionGemma is Google's function-calling-tuned Gemma 3 270M for mobile: precise on-device tool calls in Flutter via flutter_gemma, zero internet required.…
-
Gemini 4 Argon thinkingBudget 400: Fix for Flutter (2026)
Your gemini-3.x code set a thinking budget and it worked. On gemini-4-argon that same parameter returns HTTP 400 — and MINIMAL does too. Here's the exact error,…
-
Gemini 4 Argon Agent Workload Cost: Budget Dec 1 Rise
Gemini 4 Argon's intro pricing ($2/$10 per 1M tokens) ends November 30, 2026 and doubles to $4/$20 on December 1 — with no free tier. Worked per-task cost math…
-
Flutter GGUF Model App Tutorial: On-Device LLM Chat
This flutter gguf model app tutorial runs a real LLM inside your Dart app with genkit_llamadart (updated 2026-10-18): on-device chat, tool calling, structured…
-
App Check Becomes Mandatory: Firebase AI Logic Flutter Guide
app check mandatory firebase ai logic november 2026 is a hard enforcement deadline: from November 2, any AI Logic request without a valid App Check token is…
-
Gemma 4 Flutter On-Device Tutorial: The Rename Explained
Searching for a gemma 4 flutter on-device tutorial and finding flutter_gemma? The package was renamed to flutter_edge_ai (1.11.3 was the last release under the…
-
Dart Cloud Functions Firebase Tutorial: Deploy Genkit
Deploy Genkit Dart flows as Firebase Cloud Functions and keep your whole AI stack in Dart — no Node, no TypeScript. This dart cloud functions firebase tutorial…
-
genkit FirestoreSessionStore: Agents That Remember Users
genkit FirestoreSessionStore gives your defineAgent agent durable memory: every turn is saved as a snapshot in Cloud Firestore, so conversations survive turns,…
-
AQ key 401 ACCESS_TOKEN_TYPE_UNSUPPORTED: Flutter fix
Standard Gemini "traffic" keys are retired after the Truffle privilege-escalation find, and AI Studio now issues only service-account-bound AQ. auth keys. Here…
-
Firebase AI Logic Server Prompt Templates: Flutter Guide
Firebase AI Logic server prompt templates store your Gemini prompt, schema, and config on Firebase's servers — so Flutter apps update prompts with a console…
-
Fix genkit_a2ui Blank Surface: Native Widgets From Agents
genkit_a2ui blank surfaces happen when genui's basic catalog doesn't recognize the catalog id the plugin advertises. Re-tag it with basicCatalogId and your…
-
Genkit Dart 1.0 Tutorial: Stable Agentic Apps in Pure Dart
Genkit Dart 1.0 is stable — the unified model interface, schemantic type safety, and defineRemoteModel finally let you build agentic Flutter apps in pure Dart.…
-
Gemini finishReason NO_IMAGE: Surface Image Failures in UI
Your Gemini image call returns HTTP 200 and no image. The reason is in `candidate.finishReason`: `NO_IMAGE` means the model produced nothing, `IMAGE_SAFETY`…
-
firebase_ai sendMediaStream Removed: Migration Guide
Upgraded to firebase_ai 5.0.0 and your Live API audio streaming broke? LiveSession.sendMediaStream was removed — here's the numbered migration to…
-
Gemini Live API 10-Minute Session Limit: Flutter UX
The Gemini Live API cuts your WebSocket at around 10 minutes. This guide builds a Flutter session watchdog — 5- and 9-minute warnings plus a save-and-end…
-
Gemini 4 Argon Ignores temperature: Steer Output in Flutter
On gemini-4-argon, temperature, top-K and top-P are accepted and then silently ignored — while frequency penalty, presence penalty and candidateCount fail with…
-
Gemini 4 Argon Flutter: Firebase AI Logic Setup (2026)
The first stable Flutter-specific guide to calling gemini-4-argon through Firebase AI Logic: exact model ID, the Blaze plan requirement, the 65,536-token…
-
Secure Gemini API Key Flutter: Genkit Backend Auth
To secure gemini api key flutter genkit backend setups properly you need two moves: the key lives on a Dart server, and every flow call carries a Firebase ID…
-
Fix Role 'function' Not Supported: firebase_ai Tool Calls
The role function is not supported firebase_ai error is a 4.0.0-era bug: firebase_ai 4.0.0 sends tool results with role `function`, which gemini-3.8-flash…
-
403 firebasevertexai.googleapis.com Blocked: Flutter Fix
The 403 "requests to this api firebasevertexai.googleapis.com are blocked" error means your Firebase API key's restrictions don't include the Firebase AI Logic…
-
Fix firebase_options.dart Stale API Key: 400 Error Flutter
A firebase_options.dart stale api key is the most common cause of the Firebase AI Logic 400 "API key not valid" error. Your code didn't change — the key in your…
-
Prevent Gemini API Runaway Costs Loop: Firebase Spend Caps
Firebase spend caps pause AI Logic, Cloud Functions, and App Hosting when a budget hits 100% — but they are not hard caps, and usage-reporting lag means the…
-
Live Transcription Flutter Voice Agents: firebase_ai
firebase_ai's Live API can stream transcripts of both sides of a voice conversation as it happens — inputAudioTranscription and outputAudioTranscription. Here's…
-
How to Track Token Usage Gemini Streaming in Flutter
Two tools, two moments: `countTokens` tells you the input cost before you send anything, and `usageMetadata` gives you the full input/output/thinking split…
-
10 AI Features to Add to Your Flutter App (With Gemini)
10 practical AI features for your Flutter app — chatbot with memory, semantic search, photo analysis, voice, RAG, structured extraction, function calling, image…
-
"Gemini Empty Response? It's Usually a Blocked Request"
"A gemini empty response with no candidates is almost never a model bug — it's a safety block hiding behind HTTP 200. Here's how to detect it and fix your…
-
"Gemini Safety Settings in Python: HarmCategory Example"
"A working gemini safety settings python example: set HarmCategory thresholds in the current google-genai SDK and check whether the model blocked your prompt."
-
"Transcribe Meeting Audio in Python with Gemini AI"
"Here's the fastest way to transcribe meeting audio in Python with Gemini — upload the recording, ask for speaker labels, and you're done."
-
"Fix Gemini TTS Streaming Truncation (finishReason OTHER)"
"If your gemini tts streamGenerateContent call dies mid-audio with finishReason OTHER, you're hitting a real, documented streaming abort. Here's the fix."
-
"Summarize Video with Gemini API in Python: Full Guide"
"Summarize video with the Gemini API in Python: upload user clips via the Files API, wait for ACTIVE state, send structured summary prompts, clip segments with…
-
"Flutter Gemini Image Analyzer: Camera Photos to AI"
"Build a Flutter Gemini image analyzer that captures camera photos, compresses them to control token costs, and sends them to the Gemini API with firebase_ai.…
-
"Nano Banana Text-Only, No Image? Fix It in Minutes"
"If Nano Banana returns text instead of an image, the API said 200 OK and gave you nothing to save. This guide gives the direct fix: the one-line…
-
"Gemini Implicit Caching Not Working? 5 Fixes That Work"
"If gemini implicit caching is not working in your app, your bill can be 10x what it should be. This guide covers the five silent causes — minimum tokens,…
-
"Gemini Embedding 2 Tutorial: Text, Images, Audio, One Space"
"Stop captioning images to search them. Gemini Embedding 2 maps text, images, audio, video, and PDFs into a single vector space — so a text query finds the…
-
"Gemini Embeddings Semantic Search in Python, No Vector DB"
"Semantic search usually means standing up a vector database. It doesn't have to: the Gemini embeddings API plus in-memory cosine similarity gives you…
-
"Gemini File Search API Tutorial: Zero-Infrastructure RAG"
"The Gemini File Search API gives you production RAG without a vector database: upload documents to a managed store, query them with the file_search tool, and…
-
"Gemini Function Calling 400 Errors: Fix Guide"
"Your first Gemini function call works, then the second turn dies with a 400. This guide maps the five exact error strings from real GitHub issues to their root…
-
"Genkit Dart Tool Calling: Gemini Functions That Run Code"
"Function-calling tutorials always demo a fake weather function. This genkit dart defineTool example wires a real API call into Gemini: typed inputs with…
-
"Genkit Dart: Your First Type-Safe AI Flow with Gemini"
"Stop passing Maps to your AI backend and praying the keys match. This genkit dart defineFlow example builds a typed flow with schemantic — real Dart classes on…
-
"Hide Your Gemini API Key: a Flutter Backend Proxy"
"The only real way to hide a Gemini API key in a Flutter app is to never ship it. This guide builds a one-file Cloudflare Worker proxy that holds the key…
-
"Stream Gemini Response in Flutter: Done Right"
"Waiting 8 seconds for a full Gemini reply kills the chat feel. Here's how to stream a Gemini response in Flutter token-by-token with generateContentStream:…
-
"Prompt Caching & Cost Control for Gemini Apps"
"A 429 from the Gemini API is not a signal to retry — it is a signal you are out of quota, and every retry digs deeper. Here is the quota-aware Flutter pattern:…
-
"Image Comparison in Apps: Perceptual Diff Basics"
"Your golden tests pass on your Mac and fail on Linux CI — and nothing in the UI actually changed. The culprit is font-rendering drift, and the fix is…
-
"Fix speech_to_text Errors: error_no_match & error_busy"
"error_no_match and error_busy in speech_to_text are usually benign end-of-session noise — your real bugs are calling listen() while a session is alive and…
-
"On-Device AI Agent in Flutter with Gemma: Explained"
"An on-device AI agent in Flutter with Gemma turns a chatbot into software that perceives, decides, and acts — fully offline. Here is how the agent loop works,…
-
"How to Evaluate RAG Pipelines: RAGAS Metrics (2026)"
"Your RAG pipeline doesn't need a better embedding model — it needs a scoreboard. This guide shows how to evaluate RAG pipelines with RAGAS metrics, build a…
-
"Flutter Gemini Chatbot with Supabase Chat History"
"Most Flutter chatbot tutorials lose everything on restart. This one builds a Gemini chatbot whose memory lives in Supabase — per-user threads, RLS-scoped,…
-
"Gemini responseSchema 400 invalid argument: Flutter fix"
"Your schema looks valid, Gemini rejects it with 400 INVALID_ARGUMENT before generating a single token. The cause is the schema-subset rule: maxItems,…
-
"Migrate google_generative_ai to firebase_ai in Flutter"
"google_generative_ai is discontinued. This guide shows how to migrate google_generative_ai to firebase_ai in Flutter: the package swap, the backend decision,…