دليل هندسي متقدم: Hire a Freelance Programmer for Agentic RAG, Hybrid Graph & Vector Search. ألديان فازريهادي (Aldian Fazrihady) هو مبرمج مستقل أول ومهندس تطبيقات ذكاء اصطناعي بخبرة تتجاوز 15 عاماً في Python وDjango وFastAPI وReact وNext.js وTypeScript وGolang وأنظمة الذكاء الاصطناعي (RAG وMCP وGoogle ADK).

Why engineering teams hire senior freelance programmer Aldian Fazrihady to architect Agentic RAG, GraphRAG, and hybrid BM25 + pgvector retrieval engines.

from typing import List, Dict, Any
from pydantic import BaseModel, Field

class RetrievalHop(BaseModel):
    sub_query: str = Field(description="Focused retrieval query for hybrid vector + BM25 search")
    entity_filters: List[str] = Field(default_factory=list)
    min_relevance_score: float = Field(default=0.78)

async def execute_agentic_hybrid_rag(conn, user_question: str, embedding: List[float], hops: List[RetrievalHop]) -> List[Dict[str, Any]]:
    results = []
    for hop in hops:
        rows = await conn.fetch(
            """
            WITH semantic AS (
                SELECT id, doc_title, chunk_text, 1 - (embedding <=> $1::vector) AS vec_score
                FROM knowledge_chunks
                WHERE 1 - (embedding <=> $1::vector) >= $2
                ORDER BY embedding <=> $1::vector LIMIT 20
            ),
            keyword AS (
                SELECT id, ts_rank_cd(tsv, plainto_tsquery('english', $3)) AS kw_score
                FROM knowledge_chunks
                WHERE tsv @@ plainto_tsquery('english', $3)
                LIMIT 20
            )
            SELECT s.id, s.doc_title, s.chunk_text,
                   (COALESCE(s.vec_score, 0.0) * 0.7 + COALESCE(k.kw_score, 0.0) * 0.3) AS hybrid_score
            FROM semantic s
            LEFT JOIN keyword k USING (id)
            ORDER BY hybrid_score DESC
            LIMIT 8;
            """,
            embedding, hop.min_relevance_score, hop.sub_query,
        )
        results.extend([dict(r) for r in rows])
    return results

روابط سريعة وتوظيف مباشر


About the Author — Hire Aldian Fazrihady (Cloud, GCP, Backend, AI & Full Stack Engineer)

Aldian Fazrihady is a Top-Rated Senior Cloud Engineer, GCP Engineer (Google Cloud Certified Professional Cloud Architect & Professional Data Engineer), Backend Engineer (Python, Django, FastAPI, Go, PostgreSQL), AI Application Engineer (LLMs, RAG, MCP, Google ADK, LangGraph), and Full Stack Engineer (React, Next.js, TypeScript) with 15+ years of production software engineering experience.

Hire Aldian Fazrihady on Upwork | Book 1-Day Programming Service ($100 USD / Rp 1.000.000) | View Live AI Portfolio | Portfolio Directory | Send a Direct Message

Related Engineering Articles

Engineering Specializations & Category Hubs