BigV_Ai Platform Overview
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.
Dual AI Engines (Gemini & Ollama)
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
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:
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
Copy and paste this single script tag right before the closing </body> tag (or inside <head>) of your web application:
<!-- 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>
Widget Configuration 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:
data-collection="properties"data-collection="booking_policies"data-collection="faq"
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
Uploads an array of records into SQLite. Text is extracted, vectorized via the selected provider, and stored with cosine indexing.
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
Embeds the incoming user question, computes cosine similarity over stored records, retrieves the top K chunks, and synthesizes a grounded answer.
{
"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?" }
]
}
{
"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
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.
# 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"
[
{
"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
curl "https://llm.trailzyz.in/api/vectors/properties/records/prop_201"
{
"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
curl -X DELETE "https://llm.trailzyz.in/api/vectors/properties/records/prop_201"
{
"message": "Record 'prop_201' deleted successfully from collection 'properties'."
}
Batch Delete Records
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"]
}'
{
"collection": "properties",
"deletedCount": 3,
"message": "Deleted 3 records from collection 'properties'."
}
Clear Entire Collection
curl -X DELETE "https://llm.trailzyz.in/api/vectors/temp_collection"
{
"collection": "temp_collection",
"deletedCount": 15,
"message": "Collection 'temp_collection' cleared successfully. Removed 15 records."
}
Local Ollama Setup Guide
Follow these 3 quick terminal commands to configure Ollama on your server or local PC:
# 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:
"OllamaSettings": {
"BaseUrl": "http://localhost:11434",
"ChatModel": "llama3:latest",
"EmbeddingModel": "nomic-embed-text:latest",
"TimeoutSeconds": 120
}
Troubleshooting & FAQs
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 inProgram.cs. - Ollama Unreachable on IIS:
ActiveProviderwas 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.