{"id":4819,"date":"2025-08-26T12:38:58","date_gmt":"2025-08-26T12:38:58","guid":{"rendered":"https:\/\/uplatz.com\/blog\/?p=4819"},"modified":"2025-08-27T02:34:26","modified_gmt":"2025-08-27T02:34:26","slug":"faiss-pocket-book","status":"publish","type":"post","link":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/","title":{"rendered":"FAISS Pocket Book"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8-1024x576.png\" alt=\"FAISS Pocket Book\" width=\"840\" height=\"473\" class=\"alignnone size-large wp-image-4840\" srcset=\"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8-1024x576.png 1024w, https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8-300x169.png 300w, https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8-768x432.png 768w, https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png 1280w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><br \/>\n<!-- FAISS Pocket Book \u2014 Uplatz (50 Cards, Wide Layout, Readable Code, Scoped Styles) --><\/p>\n<div style=\"margin: 16px 0;\">\n<style>\n    .wp-faiss-pb { font-family: Arial, sans-serif; max-width: 1320px; margin:0 auto; }\n    .wp-faiss-pb .heading{\n      background: linear-gradient(135deg, #e0f2fe, #ccfbf1);\n      color:#0f172a; padding:22px 24px; border-radius:14px;\n      text-align:center; margin-bottom:18px; box-shadow:0 8px 20px rgba(0,0,0,.08);\n      border:1px solid #cbd5e1;\n    }\n    .wp-faiss-pb .heading h2{ margin:0; font-size:2.1rem; letter-spacing:.2px; }\n    .wp-faiss-pb .heading p{ margin:6px 0 0; font-size:1.02rem; opacity:.9; }<\/p>\n<p>    \/* Wide, dense grid *\/\n    .wp-faiss-pb .grid{\n      display:grid; gap:14px;\n      grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));\n    }\n    @media (min-width:1200px){\n      .wp-faiss-pb .grid{ grid-template-columns: repeat(3, 1fr); }\n    }<\/p>\n<p>    .wp-faiss-pb .section-title{\n      grid-column:1\/-1; background:#f8fafc; border-left:8px solid #0ea5e9;\n      padding:12px 16px; border-radius:10px; font-weight:700; color:#0f172a; font-size:1.08rem;\n      box-shadow:0 2px 8px rgba(0,0,0,.05); border:1px solid #e2e8f0;\n    }\n    .wp-faiss-pb .card{\n      background:#ffffff; border-left:6px solid #0ea5e9;\n      padding:18px; border-radius:12px;\n      box-shadow:0 6px 14px rgba(0,0,0,.06);\n      transition:transform .12s ease, box-shadow .12s ease;\n      border:1px solid #e5e7eb;\n    }\n    .wp-faiss-pb .card:hover{ transform: translateY(-3px); box-shadow:0 10px 22px rgba(0,0,0,.08); }\n    .wp-faiss-pb .card h3{ margin:0 0 10px; font-size:1.12rem; color:#0f172a; }\n    .wp-faiss-pb .card p{ margin:0; font-size:.96rem; color:#334155; line-height:1.62; }<\/p>\n<p>    \/* Color helpers *\/\n    .bg-blue { border-left-color:#0ea5e9 !important; background:#f0f9ff !important; }\n    .bg-green{ border-left-color:#10b981 !important; background:#f0fdf4 !important; }\n    .bg-amber{ border-left-color:#f59e0b !important; background:#fffbeb !important; }\n    .bg-violet{ border-left-color:#8b5cf6 !important; background:#f5f3ff !important; }\n    .bg-rose{ border-left-color:#ef4444 !important; background:#fff1f2 !important; }\n    .bg-cyan{ border-left-color:#06b6d4 !important; background:#ecfeff !important; }\n    .bg-lime{ border-left-color:#16a34a !important; background:#f0fdf4 !important; }\n    .bg-orange{ border-left-color:#f97316 !important; background:#fff7ed !important; }\n    .bg-indigo{ border-left-color:#6366f1 !important; background:#eef2ff !important; }\n    .bg-emerald{ border-left-color:#22c55e !important; background:#ecfdf5 !important; }\n    .bg-slate{ border-left-color:#334155 !important; background:#f8fafc !important; }<\/p>\n<p>    \/* Utilities *\/\n    .tight ul{ margin:0; padding-left:18px; }\n    .tight li{ margin:4px 0; }\n    .mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }\n    .kbd{ background:#e5e7eb; border:1px solid #cbd5e1; padding:1px 6px; border-radius:6px; font-family:ui-monospace,monospace; font-size:.88em; }\n    .muted{ color:#64748b; }\n    .wp-faiss-pb code{ background:#f1f5f9; padding:0 4px; border-radius:4px; border:1px solid #e2e8f0; }\n    .wp-faiss-pb pre{\n      background:#f5f5f5; color:#111827; border:1px solid #e5e7eb;\n      padding:12px; border-radius:8px; overflow:auto; font-size:.92rem; line-height:1.55;\n    }\n    .q{font-weight:700;}\n    .qa p{ margin:8px 0; }\n    .qa b{ color:#0f172a; }\n  <\/style>\n<div class=\"wp-faiss-pb\">\n<div class=\"heading\">\n<h2>FAISS Pocket Book \u2014 Uplatz<\/h2>\n<p>    50 deep-dive flashcards \u2022 Wide layout \u2022 Fewer scrolls \u2022 20+ Interview Q&amp;A \u2022 Readable Python\/C++ snippets\n  <\/p><\/div>\n<div class=\"grid\">\n    <!-- ===================== SECTION 1 ===================== --><\/p>\n<div class=\"section-title\">Section 1 \u2014 Fundamentals<\/div>\n<div class=\"card bg-blue\">\n<h3>1) What is FAISS?<\/h3>\n<p>      Facebook AI Similarity Search (FAISS) is a C++\/Python library for efficient vector similarity search and clustering. It offers exact and approximate indexes, CPU\/GPU backends, and composable building blocks (quantizers, IVF, PQ, HNSW) to scale k\u2011NN search to billions of embeddings.<\/p>\n<pre><code class=\"mono\">pip install faiss-cpu   # or faiss-gpu<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-green\">\n<h3>2) Metrics: L2 vs Inner Product vs Cosine<\/h3>\n<p>      FAISS natively supports L2 (euclidean) and inner product. For cosine, L2\u2011normalize vectors then use inner product or L2 with the appropriate transform.<\/p>\n<pre><code class=\"mono\">import faiss, numpy as np\r\nx = np.random.randn(1000, 768).astype('float32')\r\nfaiss.normalize_L2(x)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-amber\">\n<h3>3) Exact Search (Flat)<\/h3>\n<p>      <span class=\"mono\">IndexFlatL2<\/span>\/<span class=\"mono\">IndexFlatIP<\/span> perform brute\u2011force exact k\u2011NN; simplest and strong baseline for recall evaluation.<\/p>\n<pre><code class=\"mono\">index = faiss.IndexFlatL2(d)\r\nindex.add(x)  # add base vectors\r\nD, I = index.search(q, k)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-violet\">\n<h3>4) ID Management<\/h3>\n<p>      Use <span class=\"mono\">IndexIDMap<\/span>\/<span class=\"mono\">IndexIDMap2<\/span> to attach your own integer IDs to vectors; otherwise FAISS uses 0..n-1.<\/p>\n<pre><code class=\"mono\">index = faiss.IndexIDMap(faiss.IndexFlatIP(d))\r\nindex.add_with_ids(x, ids)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-rose\">\n<h3>5) Training vs Adding<\/h3>\n<p>      IVF\/PQ\/HNSW may require training on representative samples via <span class=\"mono\">index.train(x_train)<\/span> before <span class=\"mono\">add()<\/span>.<\/p>\n<pre><code class=\"mono\">index = faiss.index_factory(d, 'IVF4096,PQ64')\r\nindex.train(x_train)\r\nindex.add(x)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-cyan\">\n<h3>6) IndexFactory<\/h3>\n<p>      Build complex indexes from strings (e.g., <span class=\"mono\">&#8220;IVF4096,PQ64&#8221;<\/span>, <span class=\"mono\">&#8220;HNSW32,Flat&#8221;<\/span>) for rapid prototyping.<\/p>\n<pre><code class=\"mono\">index = faiss.index_factory(d, 'IVF2048,PQ32', faiss.METRIC_L2)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-lime\">\n<h3>7) IVFFlat<\/h3>\n<p>      Inverted File (IVF) partitions the space into <span class=\"mono\">nlist<\/span> Voronoi cells via k\u2011means; probes a subset (<span class=\"mono\">nprobe<\/span>) at query time.<\/p>\n<pre><code class=\"mono\">quant = faiss.IndexFlatL2(d)\r\nindex = faiss.IndexIVFFlat(quant, d, nlist)\r\nindex.train(x_train)\r\nindex.nprobe = 16<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-orange\">\n<h3>8) Product Quantization (PQ)<\/h3>\n<p>      Compress vectors into m subquantizers with <span class=\"mono\">nbits<\/span> each (e.g., PQ64@8 bits \u2248 64 bytes). Huge memory savings with small recall loss.<\/p>\n<pre><code class=\"mono\">index = faiss.IndexIVFPQ(quant, d, nlist, m=64, nbits=8)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-indigo\">\n<h3>9) OPQ (Rotation)<\/h3>\n<p>      Optimized PQ learns a rotation to reduce quantization error before PQ.<\/p>\n<pre><code class=\"mono\">index = faiss.index_factory(d, 'OPQ64,IVF4096,PQ64')<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-emerald\">\n<h3>10) Q&amp;A \u2014 \u201cCosine or IP?\u201d<\/h3>\n<p>      <span class=\"q\">Answer:<\/span> Cosine similarity over unit\u2011norm vectors equals inner product. Normalize once at ingest and query for best performance.\n    <\/div>\n<p>    <!-- ===================== SECTION 2 ===================== --><\/p>\n<div class=\"section-title\">Section 2 \u2014 Advanced Indexes, HNSW &amp; GPU<\/div>\n<div class=\"card bg-blue\">\n<h3>11) HNSW Graph<\/h3>\n<p>      Hierarchical Navigable Small World graphs deliver strong recall\/latency trade\u2011offs; parameters: <span class=\"mono\">M<\/span> (degree), <span class=\"mono\">efConstruction<\/span>, <span class=\"mono\">efSearch<\/span>.<\/p>\n<pre><code class=\"mono\">index = faiss.IndexHNSWFlat(d, M=32)\r\nindex.hnsw.efSearch = 128<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-green\">\n<h3>12) IVF\u2011HNSW\u2011PQ<\/h3>\n<p>      Combine IVF coarse quantizer with HNSW and PQ codes for large\u2011scale ANN under limited RAM.<\/p>\n<pre><code class=\"mono\">index = faiss.index_factory(d, 'IVF4096_HNSW32,PQ64')<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-amber\">\n<h3>13) Scalar Quantization (SQ8)<\/h3>\n<p>      Per\u2011component quantization to 8 bits; smaller than float32 while enabling fast distance computation.<\/p>\n<pre><code class=\"mono\">index = faiss.index_factory(d, 'IVF4096,SQ8')<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-violet\">\n<h3>14) GPU Basics<\/h3>\n<p>      Use <span class=\"mono\">StandardGpuResources<\/span> and clone from CPU to GPU. Multiple GPUs support sharding\/replication.<\/p>\n<pre><code class=\"mono\">res = faiss.StandardGpuResources()\r\ncpu = faiss.IndexFlatIP(d)\r\ngpu = faiss.index_cpu_to_gpu(res, 0, cpu)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-rose\">\n<h3>15) GPU IVFPQ<\/h3>\n<p>      Train on CPU, then move to GPU or train directly on GPU for speed with large samples.<\/p>\n<pre><code class=\"mono\">cpu = faiss.index_factory(d, 'IVF65536,PQ64')\r\ncpu.train(x_train)\r\ngpu = faiss.index_cpu_to_gpu(res, 0, cpu)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-cyan\">\n<h3>16) Sharding vs Replication<\/h3>\n<p>      Shard to scale capacity (split vectors across GPUs); replicate to scale throughput (same vectors on many GPUs). Use <span class=\"mono\">IndexShards<\/span>\/<span class=\"mono\">IndexReplicas<\/span>.<\/p>\n<pre><code class=\"mono\">rep = faiss.IndexReplicas()\r\nrep.addIndex(faiss.index_cpu_to_gpu(res, 0, cpu))\r\nrep.addIndex(faiss.index_cpu_to_gpu(res, 1, cpu))<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-lime\">\n<h3>17) IVF Hyperparameters<\/h3>\n<p>      <span class=\"mono\">nlist<\/span> ~ sqrt(N) as a starting point; tune <span class=\"mono\">nprobe<\/span> for recall\/latency. More <span class=\"mono\">nlist<\/span> increases training and memory; higher <span class=\"mono\">nprobe<\/span> increases query cost.<\/p>\n<pre><code class=\"mono\">index.nprobe = 8  # try 1, 4, 8, 16, 32\u2026<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-orange\">\n<h3>18) PQ Hyperparameters<\/h3>\n<p>      Choose <span class=\"mono\">m<\/span> (subquantizers) and <span class=\"mono\">nbits<\/span> per code to fit memory\/speed targets. Typical: m\u2208{32,64}, nbits\u2208{6,8}.<\/p>\n<pre><code class=\"mono\">index = faiss.IndexIVFPQ(quant, d, 4096, 64, 8)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-indigo\">\n<h3>19) HNSW Tuning<\/h3>\n<p>      Larger <span class=\"mono\">efSearch<\/span> \u21d2 higher recall but slower; larger <span class=\"mono\">M<\/span> increases memory and build time but can improve quality.<\/p>\n<pre><code class=\"mono\">index.hnsw.efConstruction = 200\r\nindex.hnsw.efSearch = 128<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-emerald\">\n<h3>20) Q&amp;A \u2014 \u201cGPU or CPU?\u201d<\/h3>\n<p>      <span class=\"q\">Answer:<\/span> Use GPU for very large indexes\/training and high QPS; CPU is simpler and often sufficient up to tens of millions. Benchmark with your vectors and latency SLOs.\n    <\/div>\n<p>    <!-- ===================== SECTION 3 ===================== --><\/p>\n<div class=\"section-title\">Section 3 \u2014 Ingestion, Search, Persistence &amp; Filtering<\/div>\n<div class=\"card bg-blue\">\n<h3>21) Add &amp; Search<\/h3>\n<p>      Typical loop: train (if needed) \u2192 add vectors \u2192 search; batch operations for throughput.<\/p>\n<pre><code class=\"mono\">index.add(x)\r\nD, I = index.search(q, k)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-green\">\n<h3>22) Range Search<\/h3>\n<p>      Retrieve neighbors within a distance threshold; useful for dedup\/near\u2011duplicates.<\/p>\n<pre><code class=\"mono\">lims, D, I = index.range_search(q, radius)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-amber\">\n<h3>23) Removing Vectors<\/h3>\n<p>      Some indexes support <span class=\"mono\">remove_ids()<\/span>; otherwise mark deleted and rebuild periodically.<\/p>\n<pre><code class=\"mono\">sel = faiss.IDSelectorBatch(np.array([42, 77], 'int64'))\r\nindex.remove_ids(sel)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-violet\">\n<h3>24) Bitset \/ IDSelector Filtering<\/h3>\n<p>      Filter search results to a subset using <span class=\"mono\">IDSelector<\/span> or bitset masks where supported (compile\u2011time option).<\/p>\n<pre><code class=\"mono\">mask = faiss.IDSelectorRange(1000, 2000)\r\nD, I = index.search(q, k, params=None, sel=mask)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-rose\">\n<h3>25) Save\/Load Index<\/h3>\n<p>      Persist to disk with <span class=\"mono\">write_index<\/span>\/<span class=\"mono\">read_index<\/span>; remember to store your own metadata elsewhere.<\/p>\n<pre><code class=\"mono\">faiss.write_index(index, 'vectors.faiss')\r\nindex = faiss.read_index('vectors.faiss')<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-cyan\">\n<h3>26) On\u2011Disk Inverted Lists<\/h3>\n<p>      Use on\u2011disk IVF for massive datasets; keep coarse quantizer in RAM. Tune OS cache and I\/O scheduler.<\/p>\n<pre><code class=\"mono\"># created via faiss.contrib.ondisk helpers (when available)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-lime\">\n<h3>27) PreTransform<\/h3>\n<p>      Compose transforms (e.g., OPQ, PCA, L2\u2011norm) before an index using <span class=\"mono\">IndexPreTransform<\/span>.<\/p>\n<pre><code class=\"mono\">opq = faiss.OPQMatrix(d, 64)\r\nindex = faiss.IndexPreTransform(opq, faiss.IndexFlatIP(d))<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-orange\">\n<h3>28) PCA for Dim Reduction<\/h3>\n<p>      Reduce d to d&#8217; to speed up search and reduce memory; retrain PQ on reduced space.<\/p>\n<pre><code class=\"mono\">pca = faiss.PCAMatrix(d, 256)\r\nindex = faiss.IndexPreTransform(pca, faiss.IndexFlatL2(256))<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-indigo\">\n<h3>29) IVF Cache &amp; Prefetch<\/h3>\n<p>      Warm up inverted lists (centroids) and tune <span class=\"mono\">nprobe<\/span>; cache hot lists when possible.<\/p>\n<pre><code class=\"mono\">index.nprobe = 32  # higher for recall, lower for latency<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-emerald\">\n<h3>30) Q&amp;A \u2014 \u201cWhere do I store metadata?\u201d<\/h3>\n<p>      <span class=\"q\">Answer:<\/span> FAISS stores only vectors and integer IDs. Keep metadata (text, JSON) in your DB; join on IDs after search.\n    <\/div>\n<p>    <!-- ===================== SECTION 4 ===================== --><\/p>\n<div class=\"section-title\">Section 4 \u2014 Evaluation, Clustering &amp; Production Patterns<\/div>\n<div class=\"card bg-blue\">\n<h3>31) Recall &amp; Latency<\/h3>\n<p>      Measure recall@k vs a Flat baseline and track P50\/P95\/P99 latencies. Optimize nprobe\/efSearch for your SLOs.<\/p>\n<pre><code class=\"mono\"># compute recall@k comparing I (ANN) to I0 (Flat)\r\nrecall = (I == I0).any(axis=1).mean()<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-green\">\n<h3>32) Ground\u2011Truth with Flat<\/h3>\n<p>      Use <span class=\"mono\">IndexFlat<\/span> on a sample to estimate upper\u2011bound recall and validate preprocessing consistency.<\/p>\n<pre><code class=\"mono\">gt = faiss.IndexFlatIP(d); gt.add(x)\r\nD0, I0 = gt.search(q, k)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-amber\">\n<h3>33) K\u2011means Clustering<\/h3>\n<p>      FAISS provides fast k\u2011means for large datasets (CPU\/GPU). Useful for centroids and analytics.<\/p>\n<pre><code class=\"mono\">km = faiss.Kmeans(d, k=1024, niter=20)\r\nkm.train(x)\r\ncentroids = km.centroids<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-violet\">\n<h3>34) Add\u2011Only vs Mutable<\/h3>\n<p>      Some indexes are add\u2011only; for frequent deletes\/updates, consider periodic rebuilds or maintain a tombstone set.<\/p>\n<pre><code class=\"mono\"># keep a deleted-id set and filter in post-processing<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-rose\">\n<h3>35) Hybrid Reranking<\/h3>\n<p>      Retrieve top\u2011K with ANN, then rerank with a heavier scorer (cross\u2011encoder, re\u2011normalized cosine) for quality.<\/p>\n<pre><code class=\"mono\">D, I = index.search(q, 100)\r\n# fetch docs by I, rerank outside FAISS<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-cyan\">\n<h3>36) Deduplication<\/h3>\n<p>      Use range search with a small radius on unit vectors to find near\u2011duplicates; keep one per cluster.<\/p>\n<pre><code class=\"mono\">lims, D, I = index.range_search(x, 1e-4)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-lime\">\n<h3>37) Batch Size &amp; BLAS<\/h3>\n<p>      Larger batch sizes improve throughput; ensure FAISS links against optimized BLAS (MKL\/OpenBLAS) for CPU.<\/p>\n<pre><code class=\"mono\">faiss.get_num_gpus()<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-orange\">\n<h3>38) Quantizer Training Set<\/h3>\n<p>      Use millions of samples for large <span class=\"mono\">nlist<\/span>\/PQ; random, representative, and preprocessed exactly like production.<\/p>\n<pre><code class=\"mono\">x_train = x[np.random.choice(len(x), 1_000_000, replace=False)]<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-indigo\">\n<h3>39) Memory Planning<\/h3>\n<p>      Estimate bytes per vector (PQ code + overhead) \u00d7 N, plus IVF lists and quantizer. Validate with <span class=\"mono\">index.sa_code_size()<\/span> when available.<\/p>\n<pre><code class=\"mono\"># rule of thumb: PQ64@8bits \u2248 64B\/vector<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-emerald\">\n<h3>40) Q&amp;A \u2014 \u201cHow big should nlist be?\u201d<\/h3>\n<p>      <span class=\"q\">Answer:<\/span> Start near \u221aN (e.g., N=100M \u21d2 nlist\u224810K). Tune alongside <span class=\"mono\">nprobe<\/span> to reach target recall\/latency; avoid extreme values without enough training data.\n    <\/div>\n<p>    <!-- ===================== SECTION 5 ===================== --><\/p>\n<div class=\"section-title\">Section 5 \u2014 Ops, Safety, Troubleshooting &amp; Interview Q&amp;A<\/div>\n<div class=\"card bg-blue\">\n<h3>41) Persistence &amp; Backups<\/h3>\n<p>      Snapshot the index file alongside your metadata DB snapshots; verify checksums and restore procedures regularly.<\/p>\n<pre><code class=\"mono\">faiss.write_index(index, '\/mnt\/snapshots\/idx_2025-08-26.faiss')<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-green\">\n<h3>42) Monitoring<\/h3>\n<p>      Track QPS, tail latency, memory, GPU utilization, training time, and recall against a canary set; alert on drops.<\/p>\n<pre><code class=\"mono\"># expose custom metrics from your service layer<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-amber\">\n<h3>43) Concurrency &amp; Threading<\/h3>\n<p>      Use FAISS\u2019s internal threading settings judiciously; also parallelize at the service layer for multi\u2011core CPUs.<\/p>\n<pre><code class=\"mono\">faiss.omp_set_num_threads(8)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-violet\">\n<h3>44) Common Errors<\/h3>\n<p>      Mismatched dims, untrained IVF\/PQ, forgetting L2 normalization for cosine, tiny <span class=\"mono\">nprobe<\/span>, or missing ID maps. Validate pipeline end\u2011to\u2011end.<\/p>\n<pre><code class=\"mono\">assert x.shape[1] == d<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-rose\">\n<h3>45) Multi\u2011Tenant Isolation<\/h3>\n<p>      Use ID ranges or separate indexes per tenant; filter by <span class=\"mono\">IDSelector<\/span> or pre\u2011route queries.<\/p>\n<pre><code class=\"mono\">sel = faiss.IDSelectorRange(lo, hi)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-cyan tight\">\n<h3>46) Production Checklist<\/h3>\n<ul>\n<li>Vector preprocessing is identical in train\/ingest\/query<\/li>\n<li>Ground\u2011truth Flat baseline &amp; recall dashboard<\/li>\n<li>Appropriate nlist\/nprobe (or efSearch) tuning<\/li>\n<li>Backups &amp; deterministic rebuild scripts<\/li>\n<li>Resource sizing for RAM\/GPU\/IO; canary tests<\/li>\n<li>Safe rollout with shadow queries &amp; AB tests<\/li>\n<\/ul><\/div>\n<div class=\"card bg-lime\">\n<h3>47) Serving Architecture<\/h3>\n<p>      Put a stateless API in front of FAISS; cache hot queries, pool memory, and colocate with feature store\/DB for low latency.<\/p>\n<pre><code class=\"mono\"># e.g., FastAPI\/Express service wrapping FAISS index<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-orange\">\n<h3>48) Evaluation Harness<\/h3>\n<p>      Maintain fixed query sets and measure recall\/latency across builds; store curves for regressions.<\/p>\n<pre><code class=\"mono\"># log recall@k and P95\/P99 per version<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-indigo\">\n<h3>49) Reproducibility<\/h3>\n<p>      Fix random seeds for k\u2011means\/PQ; record training sample hashes and index factory strings.<\/p>\n<pre><code class=\"mono\">faiss.rand_seed(1234)<\/code><\/pre>\n<\/p><\/div>\n<div class=\"card bg-emerald qa\">\n<h3>50) Interview Q&amp;A \u2014 20 Practical Questions (FAISS\u2011focused)<\/h3>\n<p>      <b>1) Why IVF?<\/b> Sublinear search by probing a subset of inverted lists; trades recall for speed.<br \/>\n      <br \/><b>2) Why PQ?<\/b> Compress vectors to fit RAM\/GPU and accelerate distance evals with acceptable recall loss.<br \/>\n      <br \/><b>3) How to use cosine?<\/b> L2\u2011normalize vectors and use inner product.<br \/>\n      <br \/><b>4) nlist\/nprobe intuition?<\/b> nlist partitions, nprobe probes at query time; higher nprobe \u21d2 better recall, slower.<br \/>\n      <br \/><b>5) OPQ vs PQ?<\/b> OPQ rotates space to minimize quantization error, often improving recall at the same code size.<br \/>\n      <br \/><b>6) HNSW vs IVF?<\/b> HNSW is graph\u2011based with efSearch; IVF is centroid\u2011based. Try both; hybrids exist.<br \/>\n      <br \/><b>7) When Flat?<\/b> Small N or need exact results; also for evaluation.<br \/>\n      <br \/><b>8) How to delete?<\/b> <span class=\"mono\">remove_ids<\/span> where supported or rebuild; maintain tombstones.<br \/>\n      <br \/><b>9) How to store metadata?<\/b> External DB keyed by IDs; FAISS is vectors+IDs only.<br \/>\n      <br \/><b>10) GPU sharding vs replication?<\/b> Shard for capacity; replicate for QPS.<br \/>\n      <br \/><b>11) What is efSearch?<\/b> HNSW parameter controlling breadth of search; higher improves recall.<br \/>\n      <br \/><b>12) Typical PQ code sizes?<\/b> 16\u201364 bytes common; 64\u2013128 bytes for higher quality.<br \/>\n      <br \/><b>13) What is IndexFactory?<\/b> String grammar to compose indexes quickly.<br \/>\n      <br \/><b>14) Range search use cases?<\/b> Near\u2011duplicate detection, clustering.<br \/>\n      <br \/><b>15) Why PreTransform?<\/b> Compose PCA\/OPQ\/normalization before the index for cleaner pipelines.<br \/>\n      <br \/><b>16) Recall measurement?<\/b> Compare ANN neighbors to Flat; compute recall@k.<br \/>\n      <br \/><b>17) Memory planning?<\/b> Estimate code size \u00d7 N; include IVF\/HNSW overhead.<br \/>\n      <br \/><b>18) Hot parameters to tune?<\/b> nprobe, m\/nbits, efSearch, batch size.<br \/>\n      <br \/><b>19) How to ensure consistency?<\/b> Same tokenize\/normalize\/projection across train\/ingest\/query.<br \/>\n      <br \/><b>20) How to pick an index?<\/b> Start with Flat baseline \u2192 try IVFFlat \u2192 IVFPQ\/OPQ \u2192 HNSW\/Hybrids; choose by SLOs &amp; cost.\n    <\/div>\n<\/p><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>FAISS Pocket Book \u2014 Uplatz 50 deep-dive flashcards \u2022 Wide layout \u2022 Fewer scrolls \u2022 20+ Interview Q&amp;A \u2022 Readable Python\/C++ snippets Section 1 \u2014 Fundamentals 1) What is FAISS? <span class=\"readmore\"><a href=\"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/\">Read More &#8230;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":4840,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2428,2462],"tags":[],"class_list":["post-4819","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-faiss","category-pocket-book"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FAISS Pocket Book | Uplatz Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FAISS Pocket Book | Uplatz Blog\" \/>\n<meta property=\"og:description\" content=\"FAISS Pocket Book \u2014 Uplatz 50 deep-dive flashcards \u2022 Wide layout \u2022 Fewer scrolls \u2022 20+ Interview Q&amp;A \u2022 Readable Python\/C++ snippets Section 1 \u2014 Fundamentals 1) What is FAISS? Read More ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/\" \/>\n<meta property=\"og:site_name\" content=\"Uplatz Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Uplatz-1077816825610769\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-26T12:38:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-27T02:34:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"uplatzblog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@uplatz_global\" \/>\n<meta name=\"twitter:site\" content=\"@uplatz_global\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"uplatzblog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/\"},\"author\":{\"name\":\"uplatzblog\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/person\\\/8ecae69a21d0757bdb2f776e67d2645e\"},\"headline\":\"FAISS Pocket Book\",\"datePublished\":\"2025-08-26T12:38:58+00:00\",\"dateModified\":\"2025-08-27T02:34:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/\"},\"wordCount\":1331,\"publisher\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/8.png\",\"articleSection\":[\"FAISS\",\"Pocket Book\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/\",\"name\":\"FAISS Pocket Book | Uplatz Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/8.png\",\"datePublished\":\"2025-08-26T12:38:58+00:00\",\"dateModified\":\"2025-08-27T02:34:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#primaryimage\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/8.png\",\"contentUrl\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/8.png\",\"width\":1280,\"height\":720,\"caption\":\"FAISS Pocket Book\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/faiss-pocket-book\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FAISS Pocket Book\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/\",\"name\":\"Uplatz Blog\",\"description\":\"Uplatz is a global IT Training &amp; Consulting company\",\"publisher\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#organization\",\"name\":\"uplatz.com\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Uplatz-Logo-Copy-2.png\",\"contentUrl\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Uplatz-Logo-Copy-2.png\",\"width\":1280,\"height\":800,\"caption\":\"uplatz.com\"},\"image\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Uplatz-1077816825610769\\\/\",\"https:\\\/\\\/x.com\\\/uplatz_global\",\"https:\\\/\\\/www.instagram.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/7956715?trk=tyah&amp;amp;amp;amp;trkInfo=clickedVertical:company,clickedEntityId:7956715,idx:1-1-1,tarId:1464353969447,tas:uplatz\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/person\\\/8ecae69a21d0757bdb2f776e67d2645e\",\"name\":\"uplatzblog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g\",\"caption\":\"uplatzblog\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FAISS Pocket Book | Uplatz Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/","og_locale":"en_US","og_type":"article","og_title":"FAISS Pocket Book | Uplatz Blog","og_description":"FAISS Pocket Book \u2014 Uplatz 50 deep-dive flashcards \u2022 Wide layout \u2022 Fewer scrolls \u2022 20+ Interview Q&amp;A \u2022 Readable Python\/C++ snippets Section 1 \u2014 Fundamentals 1) What is FAISS? Read More ...","og_url":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/","og_site_name":"Uplatz Blog","article_publisher":"https:\/\/www.facebook.com\/Uplatz-1077816825610769\/","article_published_time":"2025-08-26T12:38:58+00:00","article_modified_time":"2025-08-27T02:34:26+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png","type":"image\/png"}],"author":"uplatzblog","twitter_card":"summary_large_image","twitter_creator":"@uplatz_global","twitter_site":"@uplatz_global","twitter_misc":{"Written by":"uplatzblog","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#article","isPartOf":{"@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/"},"author":{"name":"uplatzblog","@id":"https:\/\/uplatz.com\/blog\/#\/schema\/person\/8ecae69a21d0757bdb2f776e67d2645e"},"headline":"FAISS Pocket Book","datePublished":"2025-08-26T12:38:58+00:00","dateModified":"2025-08-27T02:34:26+00:00","mainEntityOfPage":{"@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/"},"wordCount":1331,"publisher":{"@id":"https:\/\/uplatz.com\/blog\/#organization"},"image":{"@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#primaryimage"},"thumbnailUrl":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png","articleSection":["FAISS","Pocket Book"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/","url":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/","name":"FAISS Pocket Book | Uplatz Blog","isPartOf":{"@id":"https:\/\/uplatz.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#primaryimage"},"image":{"@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#primaryimage"},"thumbnailUrl":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png","datePublished":"2025-08-26T12:38:58+00:00","dateModified":"2025-08-27T02:34:26+00:00","breadcrumb":{"@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/uplatz.com\/blog\/faiss-pocket-book\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#primaryimage","url":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png","contentUrl":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/08\/8.png","width":1280,"height":720,"caption":"FAISS Pocket Book"},{"@type":"BreadcrumbList","@id":"https:\/\/uplatz.com\/blog\/faiss-pocket-book\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/uplatz.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FAISS Pocket Book"}]},{"@type":"WebSite","@id":"https:\/\/uplatz.com\/blog\/#website","url":"https:\/\/uplatz.com\/blog\/","name":"Uplatz Blog","description":"Uplatz is a global IT Training &amp; Consulting company","publisher":{"@id":"https:\/\/uplatz.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/uplatz.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/uplatz.com\/blog\/#organization","name":"uplatz.com","url":"https:\/\/uplatz.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/uplatz.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2016\/11\/Uplatz-Logo-Copy-2.png","contentUrl":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2016\/11\/Uplatz-Logo-Copy-2.png","width":1280,"height":800,"caption":"uplatz.com"},"image":{"@id":"https:\/\/uplatz.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Uplatz-1077816825610769\/","https:\/\/x.com\/uplatz_global","https:\/\/www.instagram.com\/","https:\/\/www.linkedin.com\/company\/7956715?trk=tyah&amp;amp;amp;amp;trkInfo=clickedVertical:company,clickedEntityId:7956715,idx:1-1-1,tarId:1464353969447,tas:uplatz"]},{"@type":"Person","@id":"https:\/\/uplatz.com\/blog\/#\/schema\/person\/8ecae69a21d0757bdb2f776e67d2645e","name":"uplatzblog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g","caption":"uplatzblog"}}]}},"_links":{"self":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts\/4819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/comments?post=4819"}],"version-history":[{"count":3,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts\/4819\/revisions"}],"predecessor-version":[{"id":4864,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts\/4819\/revisions\/4864"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/media\/4840"}],"wp:attachment":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/media?parent=4819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/categories?post=4819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/tags?post=4819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}