BigV_Ai Platform Overview

Enterprise Retrieval-Augmented Generation (RAG) backend supporting Cloud Gemini and Local LLaMA 3.

BigV_Ai is a high-performance ASP.NET Core 9.0 intelligent assistant platform. It combines a local SQLite-backed Vector Store with hybrid generative capabilities to power contextual question answering over business data, properties, tourism catalogs, or custom documentation.

⚡ Plug-and-Play Chat Widget
Zero-dependency script tag that embeds an isolated Shadow-DOM chat popup into any website in under 60 seconds.
🤖 Dual-Engine AI Architecture
Seamlessly toggle between Google Cloud Gemini (3.5 Flash) and 100% offline Local Ollama (LLaMA 3 + Nomic Embed).
💾 SQLite Vector Database
Zero-maintenance embedded vector database storing float embeddings with real-time cosine similarity search.
🛡️ Strict RAG Grounding
Answers strictly constrained to retrieved context chunks to completely eliminate AI hallucinations.

Dual AI Engines (Gemini & Ollama)

Understand the characteristics and dimensional differences between engines.

BigV_Ai supports two independent AI pipelines. Each engine has its own embedding vector length and synthesis model:

Feature Gemini Engine (Cloud) Ollama Engine (Local)
Primary Use Production hosting, mobile users, zero local hardware 100% On-Premise, zero cloud costs, air-gapped security
Chat Model gemini-3.5-flash llama3:latest (8B parameters)
Embedding Model gemini-embedding-001 nomic-embed-text:latest
Vector Dimensions 3,072 dimensions 768 dimensions
Requires API Key? Yes (Google AI Studio Key) No (Free & open-source)
Default Endpoint Google Cloud API Gateway http://localhost:11434

Smart Dimension Auto-Detection

How BigV_Ai prevents dimension mismatch errors automatically.

Because Gemini produces 3,072 dimensions and Ollama produces 768 dimensions, comparing vectors of differing lengths is mathematically impossible. BigV_Ai features Smart Dimension Auto-Detection:

💡
Zero Configuration Querying: When a question arrives at POST /api/vectors/{collection}/chat without an explicit provider parameter, BigV_Ai inspects the existing records in that collection. If the records have 3,072 dimensions, it generates the query embedding using Gemini. If they have 768 dimensions, it generates the query using Ollama.

Embeddable Chat Widget Guide

Add the assistant to any web application in 1 minute.

Copy and paste this single script tag right before the closing </body> tag (or inside <head>) of your web application:

HTML Embed Code
<!-- BigV AI Assistant Widget -->
<script 
  src="https://llm.trailzyz.in/widget.js" 
  charset="utf-8"
  data-api="https://llm.trailzyz.in"
  data-collection="properties"
  data-title="Kerala Property Assistant"
  data-color="#f97316"
  data-greeting="Hello! How can I help you find a rental property in Kerala today?"
  defer>
</script>
🛡️
100% Style Isolation: The widget uses the browser's native Shadow DOM. The host page's Bootstrap, Tailwind, or global CSS will never distort the widget's layout, buttons, or typography.

Widget Configuration Attributes

Customize colors, titles, collections, and AI engines via data attributes.
Attribute Default Description
data-api https://llm.trailzyz.in Base URL of the BigV_Ai backend. Auto-detected from script src if omitted.
data-collection properties The vector collection to query (e.g., properties, properties_local, tourist_destinations).
data-provider Auto-detect Explicitly force AI engine: gemini or ollama.
data-title Property Assistant Title displayed in the chat window header.
data-color #f97316 (Orange) Primary brand hex color for launcher button, user bubbles, and header.
data-greeting Hello! How can I help... Welcome message displayed when user opens the chat for the first time.
data-position right Position of floating chat bubble: right or left.
data-context Empty Optional page context injected into queries (e.g. Property ID: prop_201 (Lakeside Cottage)).

Configuring Different Pages of Your App

To use the chat widget for different features (Properties search, Booking & cancellations, or Help & FAQ), assign each page its own data-collection, title, and greeting:

🏠 1. Properties Page
data-collection="properties"
Assists visitors with finding rentals, comparing amenities, and filtering by location.
📅 2. Booking Page
data-collection="booking_policies"
Answers questions on check-in/out hours, refund policies, deposits, and ID requirements.
❓ 3. Help & FAQ Page
data-collection="faq"
Handles general customer queries, payment modes, pet policies, and 24/7 support contacts.

For Single-Page Apps (React, Vue, Next.js), you can also reconfigure the widget dynamically on route changes without reloading the page using window.BigVChatWidget.configure({ collection: 'booking_policies', title: 'Booking Help' }).

Batch Upsert Records

Vectorize and index multiple catalog items in a single request.
POST /api/vectors/{collection}/batch-upsert

Uploads an array of records into SQLite. Text is extracted, vectorized via the selected provider, and stored with cosine indexing.

cURL Request
curl -X POST "https://llm.trailzyz.in/api/vectors/properties/batch-upsert" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [
      {
        "id": "prop_201",
        "provider": "gemini",
        "content": {
          "title": "Marine Drive Waterfront 3BHK",
          "city": "Kochi",
          "rent": 32000,
          "bhk": "3 BHK",
          "amenities": ["Sea View", "Gym", "Covered Parking", "Pool"],
          "description": "Luxury 3BHK high-rise apartment on Marine Drive, Kochi with Arabian Sea views."
        }
      }
    ]
  }'

Vector Search & RAG Chat

Query the knowledge store and receive grounded natural language answers.
POST /api/vectors/{collection}/chat

Embeds the incoming user question, computes cosine similarity over stored records, retrieves the top K chunks, and synthesizes a grounded answer.

Chat Request Payload
{
  "question": "Which rental properties in Kochi have a gym and parking under 30000?",
  "provider": "gemini",
  "topK": 3,
  "history": [
    { "role": "user", "content": "Hello" },
    { "role": "assistant", "content": "Hello! How can I help you find a rental property today?" }
  ]
}
Success Response (200 OK)
{
  "answer": "Based on our records, we have two properties in Kochi matching your criteria:\n\n1. **SmartCity Tech Towers 2BHK** (₹20,000/mo) in Kakkanad - includes gym, covered parking, and lift.\n2. **City Lights 3BHK** (₹30,000/mo) in central Kochi - includes gym facilities and secure covered parking.",
  "model": "gemini-3.5-flash",
  "retrievedChunks": [
    { "index": 0, "similarity": 0.732, "text": "{ ... }" }
  ]
}

List Indexed Records & Count

Inspect all records stored inside a vector collection.
GET /api/vectors/{collection}/records

Returns an array of records in the collection with IDs, content snippets, vector dimensions, and timestamps. Pass ?full=true to receive full un-truncated content.

cURL Request
# List with snippets
curl "https://llm.trailzyz.in/api/vectors/properties/records"

# List with full un-truncated content
curl "https://llm.trailzyz.in/api/vectors/properties/records?full=true"

# Get total record count only
curl "https://llm.trailzyz.in/api/vectors/properties/count"
Response (200 OK)
[
  {
    "id": "prop_201",
    "contentSnippet": "{\"title\":\"Marine Drive Waterfront 3BHK\",\"city\":\"Kochi\",\"rent\":32000,...",
    "dimension": 3072,
    "updatedAt": "2026-09-10T09:12:00Z"
  }
]

Get Single Record by ID

Retrieve full content, metadata, and vector properties for a single item.
GET /api/vectors/{collection}/records/{id}
cURL Request
curl "https://llm.trailzyz.in/api/vectors/properties/records/prop_201"
Response (200 OK)
{
  "collection": "properties",
  "id": "prop_201",
  "content": "{\n  \"title\": \"Marine Drive Waterfront 3BHK\",\n  \"city\": \"Kochi\",\n  \"rent\": 32000,\n  \"bhk\": \"3 BHK\"\n}",
  "metadataJson": null,
  "dimension": 3072,
  "updatedAt": "2026-09-10T09:12:00Z"
}

Delete Single Record by ID

Remove a specific record and its embedding vector permanently.
DELETE /api/vectors/{collection}/records/{id}
cURL Request
curl -X DELETE "https://llm.trailzyz.in/api/vectors/properties/records/prop_201"
Response (200 OK)
{
  "message": "Record 'prop_201' deleted successfully from collection 'properties'."
}

Batch Delete Records

Delete multiple records by their IDs in a single atomic database transaction.
POST /api/vectors/{collection}/batch-delete
cURL Request
curl -X POST "https://llm.trailzyz.in/api/vectors/properties/batch-delete" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["prop_201", "prop_202", "prop_203"]
  }'
Response (200 OK)
{
  "collection": "properties",
  "deletedCount": 3,
  "message": "Deleted 3 records from collection 'properties'."
}

Clear Entire Collection

Permanently remove all records and vectors from a specified collection.
DELETE /api/vectors/{collection}
cURL Request
curl -X DELETE "https://llm.trailzyz.in/api/vectors/temp_collection"
Response (200 OK)
{
  "collection": "temp_collection",
  "deletedCount": 15,
  "message": "Collection 'temp_collection' cleared successfully. Removed 15 records."
}

Local Ollama Setup Guide

Run BigV_Ai 100% offline without API keys or cloud dependencies.

Follow these 3 quick terminal commands to configure Ollama on your server or local PC:

Terminal / PowerShell
# 1. Download and install Ollama from https://ollama.com

# 2. Pull the required chat synthesis model (LLaMA 3)
ollama pull llama3:latest

# 3. Pull the embedding vector model (768 dimensions)
ollama pull nomic-embed-text:latest

# 4. Verify Ollama is listening on port 11434
curl http://localhost:11434/api/tags

Once running, BigV_Ai connects to http://localhost:11434 automatically based on appsettings.json:

appsettings.json config
"OllamaSettings": {
  "BaseUrl": "http://localhost:11434",
  "ChatModel": "llama3:latest",
  "EmbeddingModel": "nomic-embed-text:latest",
  "TimeoutSeconds": 120
}

Troubleshooting & FAQs

Common questions and resolutions.

Why did close buttons or warnings show garbled text like `✕` or `âš ï¸`?

This is called Mojibake. When JavaScript files contain raw UTF-8 multi-byte characters and the browser loads them without an explicit charset=utf-8 header or on an ANSI host page, the browser decodes each byte into Windows-1252 ANSI characters. We solved this in BigV_Ai v2.1 by replacing all emoji and special characters with pure ASCII-safe inline SVG icons.

Why did "Could not reach the assistant. Please check server connection" appear?

This error is triggered when the browser's fetch() request fails. Common causes:

  • CORS Preflight Block: The remote server was missing Access-Control-Allow-Origin: * headers for your domain. Fixed in Program.cs.
  • Ollama Unreachable on IIS: ActiveProvider was set to Ollama, but Ollama was not installed on the remote Windows IIS server.
  • Dimension Mismatch: Collections indexed with Gemini (3072 dims) were queried with Ollama (768 dims). Fixed with auto-detection.