Appendix

Quick-reference tables for file types, keyword lists, environment variables, database paths, ports, and troubleshooting FAQ.

File Types & Upload Limits

SettingValue
Allowed extensions.pdf, .txt
Max upload size50 MB
Filename truncation50 characters (stem)
Unique suffix8-char hex UUID appended
TXT encoding detectionutf-8utf-16latin-1cp1252
Nginx max body100M
URL ingestionStored as file_type = "url" (uses trafilatura + BeautifulSoup fallback)

Product Specs additionally supports .json, .csv, and .xlsx (Excel) for bulk import. Pricing supports .json and .csv.

Pricing Keywords

When any of these 13 keywords appear in a search query, the pricing database is included in the search pipeline:

PRICING_KEYWORDS (13 total)
harga, price, berapa, biaya, cost, tarif, pricing,
promo, diskon, discount, budget, kisaran, sekitar

Price Range Trigger Words

PatternTrigger WordsBehavior
Range antara, sampai, s/d, hingga, to, dan, and Sets both min and max price
Upper bound budget, maksimal, maks, max, dibawah, di bawah, under, kurang dari Sets max price only
Lower bound minimal, min, diatas, di atas, above, lebih dari Sets min price only
Approximate sekitar, kisaran, around, kira-kira, approximately, approx Sets ±20% range around value

Indonesian Price Units

UnitAliasesMultiplier
Miliarmiliar, milyar, billion1,000,000,000
Jutajuta, jt, million1,000,000
Riburibu, rb, thousand1,000

Product Spec Keywords

When any of these 36 keywords/phrases appear in a search query, the product specs database is included in the search pipeline:

SPEC_KEYWORDS (36 total)
spesifikasi, spec, fitur, feature, transmisi, transmission,
mesin, engine, cc, tenaga, hp, hybrid, electric, listrik,
bensin, petrol, 4wd, awd, fwd, sunroof, carplay, kamera,
kamera 360, 360 camera, wireless, kursi, kapasitas, seat,
cooling seat, heated seat, cruise control, lane assist,
android auto, keyless, push start, rear camera, electric seat,
punya, ada fitur, apakah ada

Stop Words

Stop words are filtered out in Search Insights analytics and in query cleaning before database searches.

English Stop Words (~96 words)

English Stop Words
the, a, an, and, or, but, in, on, at, to, for, of, with, by,
from, as, is, was, are, were, been, be, have, has, had, do, does,
did, will, would, could, should, may, might, can, this, that,
these, those, i, you, he, she, it, we, they, what, which, who,
when, where, why, how, my, your, his, her, its, our, their, me,
him, us, them, am, if, then, than, so, also, just, some, any,
all, each, every, both, few, more, most, other, such, no, nor,
not, only, own, same, too, very, much, many, about, above, after,
again, against, among, another, before, below, between, down,
during, into, off, once, out, over, through, under, until, up,
upon, within, without

Indonesian Stop Words (~65+ words)

Indonesian Stop Words
yang, dan, untuk, atau, dalam, adalah, dengan, dari, pada, ke,
ini, itu, ada, juga, akan, saya, kamu, kami, mereka, dia, ia,
sudah, belum, masih, oleh, tersebut, dapat, bisa, harus, perlu,
seperti, karena, sebagai, antara, setiap, salah, satu, bagi,
agar, sekitar, hingga, namun, tetapi, bahwa, maka, bila, kalau,
jika, apakah, dimana, bagaimana, mengapa, kapan, siapa, apa,
mana, berapa, telah, sedang, lagi, pula, pun, saja, demi, mau,
biar, kok, sih, dong, lho, tapi, kalo, gak, nggak, engga, tak,
nah, yah, kan, deh, nih, tuh, nya, kah, lah, pasti, mungkin

Pricing & Spec Noise Words

Additional noise words are stripped from queries before searching the pricing and product spec databases. These include common filler words like:

Pricing Noise Words
sekarang, terbaru, terkini, saat, ini, itu, yang, dan, atau,
untuk, dari, dengan, ada, apa, mana, bisa, beli, jual, cari,
mau, ingin, tolong, mohon, dong, ya, nih, deh, sih, kan, lah,
the, is, are, what, how, much, does, can, latest, current, now,
today, new, please, mobil, motor, kendaraan, vehicle, car, list,
daftar, info, informasi, detail, type, tipe, model, varian, variant

Environment Variables

All variables are loaded from a .env file in the backend/ directory.

LLM & AI Providers

VariableDefaultDescription
AWS_REGIONus-east-1AWS region for Bedrock
AWS_ACCESS_KEY_IDNoneAWS access key
AWS_SECRET_ACCESS_KEYNoneAWS secret key
BEDROCK_MODEL_IDamazon.nova-lite-v1:0Bedrock model for LLM
GOOGLE_API_KEYNoneGoogle API key for Gemini
GEMINI_MODELgemini-2.0-flash-expGemini model ID
COHERE_API_KEYNoneCohere API key for embeddings
EMBED_MODELcohere.embed-multilingual-v3Embedding model name
EMBED_DIMENSIONS1024Embedding vector dimensions

Authentication

VariableDefaultDescription
JWT_SECRETchange-this-secret-in-production-via-envJWT signing secret (HS256)
JWT_EXPIRATION_HOURS8Token expiry in hours
API_KEYempty stringPublic API key (unset = no auth required)

Database

VariableDefaultDescription
MYSQL_HOSTlocalhostMySQL server hostname
MYSQL_USERrequiredMySQL username
MYSQL_PASSWORDemptyMySQL password
MYSQL_DBkbaas_moladinMySQL database name
MYSQL_PORT3306MySQL port
VariableDefaultDescription
ACTIVITY_LOG_RETENTION_DAYS120Days to keep activity logs
DEFAULT_CHUNK_SIZE500Default text chunk size
DEFAULT_CHUNK_OVERLAP50Default chunk overlap
RELEVANCE_THRESHOLD0.5Minimum relevance score
LLM_TEMPERATURE0.7Default LLM temperature
MAX_TOKENS2000Max LLM output tokens
TOP_K50Top-K results for retrieval
VECTOR_WEIGHT0.5Weight for vector search in hybrid
BM25_WEIGHT0.5Weight for BM25 search in hybrid
PRICING_WEIGHT0.25Weight for pricing results in fusion

Default Port Numbers

ServicePortNotes
Backend (FastAPI)8000Uvicorn default
Frontend (dev)3000Python HTTP server
Docs Site8001Separate FastAPI instance
MySQL3306Standard MySQL port

Database File Locations

All paths are relative to backend/data/:

DatabasePathEngine
Knowledge Basesqlite/knowledge.dbSQLite + FTS5
Vector Storechroma/ChromaDB (persistent)
Settingssqlite/settings.dbSQLite
Pricingsqlite/pricing.dbSQLite + FTS5
Product Specssqlite/product_specs.dbSQLite + FTS5
Admin Userssqlite/users.dbSQLite
Query HistoryMySQL kbaas_moladinMySQL
Activity LogMySQL kbaas_moladinMySQL
File Uploadsuploads/Filesystem

Keyboard Shortcuts

ShortcutLocationAction
EnterDebug Search inputRun debug search
Ctrl + EnterWidget textareaSubmit search query

Query Topic Categories

The query decomposer maps ~107 keywords to search-hint categories for improved retrieval. Below are the category groupings:

CategoryKeywords (EN & ID)
Price / Cost harga, price, murah, mahal, cheap, expensive, cost, biaya, tarif, rate, pricing, budget, afford
Specs spesifikasi, spec, specifications, specs, spek
Features fitur, feature, features, keunggulan, advantage, capability, fungsi, function
Pros / Cons kelebihan, kekurangan, pros, cons, pro, con, disadvantage, drawback
Reviews review, ulasan, rating, penilaian, feedback, testimoni, testimonial
Performance performa, performance, kinerja, benchmark, speed, kecepatan
Dimensions dimensi, dimension, ukuran, size, berat, weight, tinggi, height, lebar, width, panjang, length
Consumption konsumsi, consumption, efisiensi, efficiency, bbm, fuel, daya, power, usage
Design interior, exterior, desain, design, tampilan, appearance, warna, color, colour, style
Technical mesin, engine, motor, processor, prosesor, cpu, gpu, ram, memori, memory, storage, penyimpanan, disk, ssd, baterai, battery, kamera, camera, layar, screen, display, sensor, chip, kapasitas, capacity
Safety keamanan, safety, security, aman, safe, protection, perlindungan
Warranty garansi, warranty, servis, service, maintenance, perawatan, support, dukungan
Quality kualitas, quality, terbaik, best, terburuk, worst, reliable, reliability, durability, ketahanan
Availability tersedia, available, availability, ketersediaan, stok, stock
Compatibility kompatibel, compatible, compatibility, support
General bagus, good, bad, jelek, worth, value, recommend, rekomendasi

Security Configuration

MechanismDetails
CORSAll origins (*), all methods, all headers, credentials allowed
API KeyX-API-Key header for public endpoints; optional if not configured
JWTHS256 in Authorization: Bearer header for admin endpoints
Password Hashingbcrypt (72-byte limit)
Activity LoggingAll POST/PUT/DELETE requests logged; login payloads redacted
Rate LimitingNone (must be enforced via reverse proxy)

Troubleshooting FAQ

Search returns no results

Pricing data not found in search

Cannot log in

LLM response fails or times out

Widget doesn't appear on page

VectorDB shows 0 vectors