Logo Postgres Semantic Search

Postgres Semantic Search

Cộng đồng
laguagu
postgres-semantic-search

Tìm kiếm ngữ nghĩa và tìm kiếm kết hợp dựa trên PostgreSQL với pgvector và ParadeDB. Dùng khi triển khai tìm kiếm vector, tìm kiếm ngữ nghĩa, tìm kiếm kết hợp hoặc tìm kiếm toàn văn trong PostgreSQL. Bao gồm lập chỉ mục pgvector, FTS/BM25 kết hợp với RRF, ParadeDB, xếp hạng lại, halfvec, tìm kiếm đa ngôn ngữ, dịch truy vấn và đánh giá theo lĩnh vực. Kích hoạt với: pgvector, tìm kiếm vector, tìm kiếm ngữ nghĩa, tìm kiếm kết hợp, tìm kiếm embedding, PostgreSQL RAG, BM25, RRF, HNSW, IVFFlat, ParadeDB, pg_search, xếp hạng lại, iterative_scan, HNSW có bộ lọc, halfvec, websearch_to_tsquery, unaccent, FTS đa ngôn ngữ, pg_trgm, trigram, tìm kiếm gần đúng, ILIKE, tự động hoàn thành, khả năng chịu lỗi chính tả, fuzzystrmatch, Hit@K, MRR, đánh giá truy xuất, truy xuất xuyên ngôn ngữ, kho dữ liệu không phải tiếng Anh, lập chỉ mục theo ngôn ngữ, dịch truy vấn. Với các tác vụ về lược đồ Postgres, chỉ mục, RLS hoặc tối ưu truy vấn không liên quan đến truy xuất, hãy dùng supabase-postgres-best-practices.

Add to TypingMind

Tổng quan

Nhà phát hànhlaguagu
Kho mãclaude-code-nextjs-skills
Tên kỹ năngpostgres-semantic-search
Sao
64
Bản fork
18
Tệp đi kèm
16
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 16 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được laguagu công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Postgres Semantic Search trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/laguagu/claude-code-nextjs-skills/tree/main/skills/postgres-semantic-search
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/laguagu/claude-code-nextjs-skills.git /tmp/claude-code-nextjs-skills
mkdir -p .claude/skills
cp -r /tmp/claude-code-nextjs-skills/skills/postgres-semantic-search .claude/skills/postgres-semantic-search
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Postgres Semantic Search trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Postgres Semantic Search ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Postgres Semantic Search với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

PostgreSQL Semantic Search

Quick Start

1. Setup

sql
CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE documents (
    id SERIAL PRIMARY KEY,
    content TEXT NOT NULL,
    embedding vector(1536)  -- 1536-dim embedding
    -- Or: embedding halfvec(3072)  -- 3072-dim embedding (halfvec = 50% memory)
);

2. Basic Semantic Search

sql
SELECT id, content, 1 - (embedding <=> query_vec) AS similarity
FROM documents
ORDER BY embedding <=> query_vec
LIMIT 10;

3. Add Index (> 10k documents)

sql
CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops);

Docker Quick Start

bash
# pgvector with PostgreSQL 17
docker run -d --name pgvector-db \
  -e POSTGRES_PASSWORD=postgres \
  -p 5432:5432 \
  pgvector/pgvector:pg17

# Or PostgreSQL 18
docker run -d --name pgvector-db \
  -e POSTGRES_PASSWORD=postgres \
  -p 5432:5432 \
  pgvector/pgvector:pg18

# ParadeDB (includes pgvector + pg_search + BM25)
docker run -d --name paradedb \
  -e POSTGRES_PASSWORD=postgres \
  -p 5432:5432 \
  paradedb/paradedb:latest  # `latest` is convenient for quick-start; pin to e.g. paradedb/paradedb:pg17 for reproducible builds

Connect: psql postgresql://postgres:postgres@localhost:5432/postgres

Cheat Sheet

Common Queries

sql
-- Top 10 similar (cosine)
SELECT * FROM docs ORDER BY embedding <=> $1 LIMIT 10;

-- With similarity score
SELECT *, 1 - (embedding <=> $1) AS similarity FROM docs ORDER BY embedding <=> $1 LIMIT 10;

-- With a distance threshold — put the filter OUTSIDE a materialized CTE.
-- Filtering inline (WHERE (embedding <=> $1) < 0.3 ORDER BY ... LIMIT 10) makes
-- the executor apply the filter before the index returns LIMIT rows, so you get
-- fewer results than expected. pgvector documents this CTE form as the fix.
WITH nearest AS MATERIALIZED (
  SELECT id, content, embedding <=> $1 AS distance FROM docs
  ORDER BY distance LIMIT 10
) SELECT * FROM nearest WHERE distance < 0.3 ORDER BY distance;

-- Preload index (run on startup)
SELECT 1 FROM docs ORDER BY embedding <=> $1 LIMIT 1;

Index Quick Reference

sql
-- HNSW (recommended)
CREATE INDEX ON docs USING hnsw (embedding vector_cosine_ops);

-- With tuning
CREATE INDEX ON docs USING hnsw (embedding vector_cosine_ops)
WITH (m = 24, ef_construction = 200);

-- Query-time recall. Set this: pgvector's default of 40 costs recall silently
-- (measured ~1.1 pp at 54k vectors for no latency saving; on a 22k-vector
-- corpus recall@20 went 96.2% -> 99.2% for +0.7 ms median). See indexing.md.
-- Query-time settings are connection-local. Use SET LOCAL inside a transaction
-- when a transaction pooler can hand each request a different connection.
SET hnsw.ef_search = 100;

-- Iterative scan for filtered queries (pgvector 0.8+; OFF by default)
SET hnsw.iterative_scan = relaxed_order;    -- or strict_order
SET ivfflat.iterative_scan = relaxed_order; -- IVFFlat has no strict_order

Decision Trees

Choose Search Method

Query type?
├─ Conceptual/meaning-based → Pure vector search
├─ Exact terms/names → Pure keyword search (FTS)
├─ Fuzzy/typo-tolerant → pg_trgm trigram similarity
├─ Autocomplete/prefix → pg_trgm + prefix index
├─ Substring (LIKE/ILIKE) → pg_trgm GIN index
└─ Mixed/unknown → Hybrid search
    ├─ Simple setup → FTS + RRF (no extra extensions)
    ├─ Better ranking → BM25 + RRF (pg_search extension)
    └─ Full-featured → ParadeDB (Elasticsearch alternative)

Baseline hybrid against vector-only before shipping it. Hybrid is the right default for mixed queries, not an automatic win: on one measured corpus pure vector beat a well-weighted hybrid on both recall and MRR and was 9× faster, while a badly weighted one lost 10 pp. The keyword arm still earns its keep for exact identifiers, which a needle-in-haystack eval set cannot see — so keep it, and judge it on queries that need it. Numbers in hybrid-search.md.

Choose Index Type

Document count?
├─ < 10,000 → No index needed
├─ 10k - 1M → HNSW (best recall)
└─ > 1M → IVFFlat (less memory) or HNSW

Choose Vector Type

Choose by dimensions, not by provider — the column type only depends on embedding size and pgvector's HNSW index limits.

Embedding dimensions (N)?
├─ N ≤ 2000  → vector(N)   — HNSW indexable directly
├─ 2000 < N ≤ 4000 → halfvec(N) — vector(N)'s HNSW limit is 2000; halfvec extends to 4000
└─ N > 4000  → vector(N) without HNSW, or quantize via dimensionality reduction

Common embedding dimensions are 1536 and 3072, but sizes vary by provider and model — check the provider's docs for the embedding you're using.

For multilingual / non-English content, prefer multilingual-tuned embedding models (look for "multilingual" in the model name). Models tuned only on English may handle compound words and inflection poorly.

Storage vs. index trick for 2000 < N ≤ 4000: keep the column as vector(N) (full float4, useful for future re-embedding or re-ranking experiments) and only cast at index creation and query time. This preserves precision on disk while staying within HNSW's dimension limit.

sql
CREATE INDEX ON docs USING hnsw ((embedding::halfvec(3072)) halfvec_cosine_ops);
-- Query must cast identically so the planner picks the index:
SELECT * FROM docs ORDER BY embedding::halfvec(3072) <=> $1 LIMIT 10;

If storage is tight or you never plan to re-embed, use halfvec(N) as the column type directly.

Measure before adopting

Every optimization in this skill (hybrid fusion, reranking, query expansion, embedding-model swaps) can regress on a specific corpus. Vendor and paper benchmarks are usually English, general-domain, and their ordering does not reliably transfer. Real counter-examples, each measured rather than argued:

  • Query expansion (HyDE) regressing Hit@5 by tens of points on a domain corpus. On another, it found +1.1 pp more and ranked worse (MRR 0.557 → 0.536) at 6× the hybrid latency — a reranking loss dressed as a recall win.
  • A widely recommended reranker regressing Hit@5 double-digits on multilingual text.
  • Translating an off-language query into a keyword list rather than a sentence: it helped the arm it targeted and finished 14 pp below doing nothing at all.
  • Raising top-k from 15 to 30: recall +5.4 pp, and the share of generated claims actually supported by a source fell 82.1 % → 78.8 %. Better retrieval, worse answer.
  • The cheapest open embedding model beating the paid one on the target corpus, reversing the leaderboard order.

Rule: build a domain eval set (evaluation.md), then A/B each change. Adopt with ≥ +3 pp Hit@5 and p95 latency within budget; reject otherwise.

Three traps that make an A/B lie, each covered in evaluation.md: measuring one retrieval arm instead of the pipeline; treating retrieval metrics as the goal when an LLM consumes the results; and reading an offline sweep's absolute numbers as a production forecast. Use two eval sets — generated sentences and 1–3 word domain terms — because a change that helps one has measured as hurting the other.

Operators

OperatorDistanceUse Case
<=>CosineText embeddings (default)
<->L2/EuclideanImage embeddings
<#>Negative inner productAlready-normalized vectors. Negative so that ORDER BY ascending still puts the closest first — negate it to read as a score
<+>L1 / taxicab (vector_l1_ops, HNSW only)Outlier-heavy features; vector, halfvec, sparsevec
<~>Hamming (bit_hamming_ops)Binary embeddings stored as bit(n) — compact and fast, coarser recall
<%>Jaccard (bit_jaccard_ops, HNSW only)Set-style binary embeddings as bit(n)

SQL Functions

These are defined by this skill, not by pgvector. Install them by running the matching file from scripts/ — match_documents does not exist in a database that has not had semantic_search.sql applied. Parameter names below are the real ones from the scripts — Supabase .rpc() binds by name, so a misspelled key fails at call time.

Semantic Search — scripts/semantic_search.sql

  • match_documents(query_embedding, match_threshold, match_count) - Basic search
  • match_documents_filtered(query_embedding, filter_metadata, match_threshold, match_count) - With JSONB filter
  • match_documents_halfvec(query_embedding halfvec(3072), match_threshold, match_count) - halfvec column variant
  • match_documents_dynamic(table_name, query_embedding, match_threshold, match_count) - Same search against any table name
  • match_chunks(query_embedding, match_threshold, match_count) - Search document chunks

Fuzzy Search (pg_trgm) — scripts/fuzzy_search.sql

  • fuzzy_search_trigram(query_text, similarity_threshold, max_results) - Trigram similarity search
  • autocomplete_search(search_prefix, max_results) - Prefix + fuzzy autocomplete
  • hybrid_search_fuzzy_semantic(query_text, query_embedding, max_results, rrf_k) - Fuzzy + vector RRF
  • weighted_fts_search(query_text, fts_language, max_results) - FTS with title/content weighting

Hybrid Search (FTS) — scripts/hybrid_search_fts.sql

  • hybrid_search_fts(query_embedding, query_text, match_count, rrf_k, fts_language) - FTS + RRF
  • hybrid_search_weighted(query_embedding, query_text, match_count, semantic_weight, keyword_weight, fts_language) - Linear combination
  • hybrid_search_fallback(query_embedding, query_text, match_count, rrf_k, fts_language) - Graceful degradation (either input may be NULL)

These functions do not set hnsw.ef_search; the caller controls that query-time tradeoff. Set it on the active connection (or with SET LOCAL in the same transaction) before calling, or pgvector's default of 40 applies. Their keyword arm also wraps content in unaccent() and computes the tsvector per row; read the header of hybrid_search_fts.sql before using them on Finnish, Swedish, German or Turkish text, or on a table that has a tsvector GIN index.

Hybrid Search (BM25) — scripts/hybrid_search_bm25.sql

  • hybrid_search_bm25(query_embedding, query_text, match_count, rrf_k) - BM25 + RRF
  • hybrid_search_bm25_highlighted(query_embedding, query_text, match_count, rrf_k) - With snippet highlighting
  • hybrid_search_chunks_bm25(query_embedding, query_text, match_count, rrf_k) - For RAG with chunks

Re-ranking (Optional)

Two-stage retrieval improves precision: fast recall → precise rerank with a cross-encoder. Use when results need higher precision and you have <50 candidates after initial retrieval.

Key rule: rerankers must be wrapped so a failure (missing key, HTTP error, timeout) returns null and the caller falls back to original retrieval order — never let a reranker outage break search.

For provider comparison, generic Promise<T | null> wrapper, and self-hosted options, see reranking.md.

Multilingual / non-English content

Non-English corpora fail in specific, silent ways: the wrong FTS config skips stemming, unaccent merges distinct Finnish/Swedish/German words, zero-width characters glue onto tokens, every parser ANDs a long question into zero hits, and English-derived chunk caps overflow the embedding endpoint. The rules and fixes — FTS configs, prefix tsquery, synonym expansion, query translation, ParadeDB stemmer casts, per-language indexing, cross-language RRF fusion — are in multilingual.md. Read it before indexing anything that is not English prose.

References

  • fuzzy-search.md - pg_trgm, fuzzy matching, LIKE/ILIKE, autocomplete, advanced FTS
  • paradedb.md - ParadeDB full-text search (Elasticsearch alternative)
  • vector-types.md - vector vs halfvec, dimensions, storage
  • indexing.md - HNSW, IVFFlat, GIN parameters
  • hybrid-search.md - FTS, BM25, RRF algorithms
  • performance.md - Cold-start, memory, HNSW vs IVFFlat
  • evaluation.md - Eval-set construction, Hit@K / MRR, adoption thresholds, reranker/expansion benchmarking
  • reranking.md - Two-stage retrieval, graceful fallback, when rerankers regress
  • multilingual.md - FTS configs and unaccent rules, invisible characters, prefix tsquery, query translation, per-language indexing, cross-language RRF

Scripts

Common Patterns

TypeScript Integration (Supabase)

typescript
// Semantic search
const { data } = await supabase.rpc('match_documents', {
  query_embedding: embedding,
  match_threshold: 0.7,
  match_count: 10
});

// Hybrid search
const { data } = await supabase.rpc('hybrid_search_fts', {
  query_embedding: embedding,
  query_text: userQuery,
  match_count: 10,
  rrf_k: 60,
  fts_language: 'simple'
});

Drizzle ORM

typescript
import { sql } from 'drizzle-orm';

const results = await db.execute(sql`
  SELECT * FROM match_documents(
    ${embedding}::vector(1536),
    0.7,
    10
  )
`);

Troubleshooting

SymptomCauseSolution
Index not used< 10k rows or planner choiceNormal for small tables, check with EXPLAIN
Slow first query (30-60s)HNSW cold-startSELECT pg_prewarm('idx_name') or preload query
Poor recallLow ef_searchSET hnsw.ef_search = 100 or higher
FTS returns nothingWrong language configUse 'simple' for mixed/unknown languages
Long plain-language question returns 0 keyword hitsParser ANDs every termFor queries without explicit OR, quotes, or -, parse with plainto_tsquery, rewrite &→|, and rank with ts_rank_cd — see hybrid-search.md
FTS misses a word that is visibly thereInvisible character (U+200B etc.) glued to the token blocks stemmingStrip zero-width characters at ingest and query time
could not determine data type of parameter $NA placeholder never appears in this variant's SQL (e.g. vector-only vs keyword-only mode sharing one numbering)Give each query variant its own statement and parameter numbering
Memory error on index buildmaintenance_work_mem too lowIncrease to 2GB+
"Cosine similarity" > 1<#> used in the cosine formula1 - (a <=> b) is cosine similarity and is bounded in [-1, 1] whatever the magnitudes — <=> divides by them. <#> returns the negative inner product, unbounded: for [3,4] and [6,8] it is -50, so 1 - (a <#> b) is 51. Use <=> for cosine, or (a <#> b) * -1 for inner product on already-normalized vectors
Slow insertsIndex overheadBatch inserts, consider IVFFlat
Fuzzy search slowMissing trigram indexCREATE INDEX USING gin (col gin_trgm_ops)
ILIKE '%x%' slowNo pg_trgm GIN indexEnable pg_trgm + create GIN trigram index
% operator errorpg_trgm not installedCREATE EXTENSION IF NOT EXISTS pg_trgm

Compatibility

  • pgvector: 0.8.6+ recommended as the safe floor (as of 2026-09). Feature history: 0.7.0 added halfvec/bit/sparsevec, 0.8.0 added iterative scans. Correctness history: 0.6.0–0.8.1 carry a parallel-HNSW-build buffer overflow (CVE-2026-3172 — leaks data from other relations or crashes the server), 0.8.2 fixed it, 0.8.3 fixed possible HNSW index corruption during vacuum, 0.8.4 fixed further HNSW vacuum errors, and 0.8.6 fixed an IVFFlat build integer wraparound on 32-bit systems (CVE-2026-18022). Verify current state in the CHANGELOG — the GitHub Releases tab is empty, releases ship as tags.
  • pg_search: Since 0.25.0 pg_search depends on pgvector's vector type — install pgvector first. Check ParadeDB releases for latest.
  • PostgreSQL: pgvector supports 13+; pg_search ships prebuilt binaries for 15+. Prefer the newest major your host offers.

Related Skills

NeedSkill
General Postgres performance, indexes, RLS, connection pooling/supabase-postgres-best-practices
Chatbot orchestration, session DB, tool calls, HITL, feedback/nextjs-chatbot
AI SDK usage for embeddings and retrieval/ai-sdk

For ParadeDB-specific questions, always apply the Documentation Fetch Policy in references/paradedb.md — live docs at https://www.paradedb.com/docs/llms-full.txt are the authoritative source.

External Documentation

Core

Embedding providers

Reranker providers

Hosting / extensions

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Postgres Semantic Search làm được gì?

Tìm kiếm ngữ nghĩa và tìm kiếm kết hợp dựa trên PostgreSQL với pgvector và ParadeDB. Dùng khi triển khai tìm kiếm vector, tìm kiếm ngữ nghĩa, tìm kiếm kết hợp hoặc tìm kiếm toàn văn trong PostgreSQL. Bao gồm lập chỉ mục pgvector, FTS/BM25 kết hợp với RRF, ParadeDB, xếp hạng lại, halfvec, tìm kiếm đa ngôn ngữ, dịch truy vấn và đánh giá theo lĩnh vực. Kích hoạt với: pgvector, tìm kiếm vector, tìm kiếm ngữ nghĩa, tìm kiếm kết hợp, tìm kiếm embedding, PostgreSQL RAG, BM25, RRF, HNSW, IVFFlat, ParadeDB, pg_search, xếp hạng lại, iterative_scan, HNSW có bộ lọc, halfvec, websearch_to_tsquery, unacc...

Vì sao nên dùng Postgres Semantic Search trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Postgres Semantic Search là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Postgres Semantic Search trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/laguagu/claude-code-nextjs-skills/tree/main/skills/postgres-semantic-search. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Postgres Semantic Search?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Postgres Semantic Search với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Postgres Semantic Search với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Postgres Semantic Search có miễn phí không?

Có. Kỹ năng này được laguagu phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇