Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for high-performance Vector Databases, Deep RAG architectures, pgvector 0.8+ HNSW, Reciprocal Rank Fusion (RRF), Cross-Encoder Re-ranking, and Late Chunking / Panduan ahli Vector DB, arsitektur Deep RAG, pgvector HNSW, RRF, dan Re-ranking.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
<a name="english"></a>
Production-grade architectural guide for Vector Databases (PostgreSQL pgvector 0.8+, Qdrant, LanceDB, Pinecone), Deep RAG indexing strategies, HNSW iterative search, Reciprocal Rank Fusion (RRF) hybrid retrieval, Cross-Encoder Re-ranking (Cohere Rerank v3, FlashRank, BGE-Reranker-v2), and Late Chunking to eliminate context fragmentation.
import { sql } from 'drizzle-orm';
import { db } from '@/lib/db';
export interface SearchResult {
id: string;
content: string;
score: number;
}
/**
* Executes Reciprocal Rank Fusion (RRF) combining BM25 keyword search and pgvector HNSW
* k = 60 is the industry standard constant
*/
export async function reciprocalRankFusionSearch(
queryVector: number[],
queryText: string,
limit = 10,
k = 60
): Promise<SearchResult[]> {
const formattedVector = JSON.stringify(queryVector);
const results = await db.execute(sql`
WITH vector_matches AS (
SELECT id, ROW_NUMBER() OVER (ORDER BY embedding <=> ${formattedVector}::vector) AS rank
FROM documents
WHERE status = 'published'
ORDER BY embedding <=> ${formattedVector}::vector
LIMIT 50
),
text_matches AS (
SELECT id, ROW_NUMBER() OVER (ORDER BY ts_rank_cd(fts, websearch_to_tsquery('english', ${queryText})) DESC) AS rank
FROM documents
WHERE fts @@ websearch_to_tsquery('english', ${queryText})
LIMIT 50
)
SELECT
d.id,
d.content,
COALESCE(1.0 / (${k} + v.rank), 0.0) +
COALESCE(1.0 / (${k} + t.rank), 0.0) AS rrf_score
FROM documents d
LEFT JOIN vector_matches v ON d.id = v.id
LEFT JOIN text_matches t ON d.id = t.id
WHERE v.id IS NOT NULL OR t.id IS NOT NULL
ORDER BY rrf_score DESC
LIMIT ${limit};
`);
return results.rows as unknown as SearchResult[];
}
import { FlashRankRegistry } from 'flashrank';
const ranker = new FlashRankRegistry();
export async function rerankCandidates(query: string, candidates: { id: string; text: string }[], topN = 5) {
const passages = candidates.map(c => ({ id: c.id, text: c.text }));
// Ultra-fast client/server cross-encoder re-ranking
const reranked = await ranker.rerank({
query,
passages,
model: 'ms-marco-TinyBERT-L-2-v2', // Lightweight, 2ms latency
});
return reranked.slice(0, topN);
}
HNSW index in PostgreSQL: CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops) WITH (m = 16, ef_construction = 64);hnsw.ef_search = 100 for high-recall queries during production traffic.k = 60 instead of arbitrary linear weighting.ai-llm-integration-expert, database-orm-expert, llm-finops-router, app-analyzer-optimizer.<a name="bahasa-indonesia"></a>
Panduan arsitektur tingkat produksi untuk Vector Database (PostgreSQL pgvector 0.8+, Qdrant, LanceDB, Pinecone), arsitektur Deep RAG modern, pencarian HNSW iteratif, Reciprocal Rank Fusion (RRF) hybrid retrieval, Cross-Encoder Re-ranking (Cohere Rerank v3, FlashRank, BGE-Reranker-v2), dan Late Chunking untuk mencegah fragmentasi konteks.
import { sql } from 'drizzle-orm';
import { db } from '@/lib/db';
export async function cariDokumenRRF(
queryVector: number[],
queryText: string,
limit = 10,
k = 60
) {
const vectorStr = JSON.stringify(queryVector);
const hasil = await db.execute(sql`
WITH vector_matches AS (
SELECT id, ROW_NUMBER() OVER (ORDER BY embedding <=> ${vectorStr}::vector) AS rank
FROM documents
WHERE status = 'published'
ORDER BY embedding <=> ${vectorStr}::vector
LIMIT 50
),
text_matches AS (
SELECT id, ROW_NUMBER() OVER (ORDER BY ts_rank_cd(fts, websearch_to_tsquery('english', ${queryText})) DESC) AS rank
FROM documents
WHERE fts @@ websearch_to_tsquery('english', ${queryText})
LIMIT 50
)
SELECT
d.id,
d.content,
COALESCE(1.0 / (${k} + v.rank), 0.0) +
COALESCE(1.0 / (${k} + t.rank), 0.0) AS skor_rrf
FROM documents d
LEFT JOIN vector_matches v ON d.id = v.id
LEFT JOIN text_matches t ON d.id = t.id
WHERE v.id IS NOT NULL OR t.id IS NOT NULL
ORDER BY skor_rrf DESC
LIMIT ${limit};
`);
return hasil.rows;
}
import { FlashRankRegistry } from 'flashrank';
const ranker = new FlashRankRegistry();
export async function susunUlangKandidat(kueri: string, kandidat: { id: string; text: string }[], topN = 5) {
const passages = kandidat.map(c => ({ id: c.id, text: c.text }));
const hasilRerank = await ranker.rerank({
query: kueri,
passages,
model: 'ms-marco-TinyBERT-L-2-v2',
});
return hasilRerank.slice(0, topN);
}
HNSW di PostgreSQL: CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops) WITH (m = 16, ef_construction = 64);hnsw.ef_search = 100 untuk kueri dengan recall tinggi di lingkungan produksi.k = 60 alih-alih pembobotan linear manual.ai-llm-integration-expert, database-orm-expert, llm-finops-router, app-analyzer-optimizer.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.
日本語の概要は準備中です。原文の説明を表示しています。
Expert guide for designing Machine-to-Machine (M2M) micro-economies, autonomous agent wallets, and swarm budget allocation / Panduan ahli merancang ekonomi mikro antar-agen (M2M), dompet agen otonom, dan alokasi anggaran swarm.
日本語の概要は準備中です。原文の説明を表示しています。