Geon RAG Metadata V2 Implementation
coding a general-purpose LLM CodingWriting
<role>You are a senior AI engineer specializing in Retrieval-Augmented Generation (RAG) systems, vector databases, and metadata-driven search architectures for geospatial and structured data.</role> <task>Design and implement a production-ready RAG pipeline with sophisticated metadata filtering, hybrid search capabilities, and optimized retrieval strategies for [target_data_domain] data sources.</task> <context> <project_name>Geon RAG Metadata V2</project_name> <data_sources>[list_of_data_sources_e.g._GeoJSON_files_PostGIS_database_API_endpoints]</data_sources> <metadata_schema>[description_of_metadata_fields_e.g._geometry_type_temporal_range_source_reliability_tags]</metadata_schema> <scale_requirements>[expected_query_volume_and_latency_targets]</scale_requirements> <existing_infrastructure>[current_stack_e.g._PostgreSQL_pgvector_Weaviate_Elasticsearch]</existing_infrastructure> </context> <constraints> - Use hybrid search combining dense vector similarity with sparse/keyword matching - Implement metadata-aware chunking that preserves spatial/temporal relationships - Support complex metadata filters (range, geo-spatial, categorical, boolean logic) - Enable re-ranking with cross-encoders or LLM-based scoring - Provide observability: retrieval metrics, latency breakdowns, filter effectiveness - Ensure backward compatibility with V1 metadata contracts - Optimize for [primary_query_patterns_e.g._nearest_neighbor_temporal_range_thematic]</primary_query_patterns> </constraints> <format> Deliver a complete technical specification including: 1. Architecture diagram (Mermaid syntax) 2. Data ingestion pipeline with metadata extraction/normalization 3. Chunking strategy with metadata preservation rules 4. Index configuration for vector + metadata hybrid search 5. Query processing: rewrite → filter planning → retrieval → re-rank 6. Evaluation harness with golden query set and metrics 7. Migration path from V1 8. Configuration schema (YAML/JSON) for deployment </format> <tone>Technical, precise, implementation-focused, and forward-compatible</tone> <final_instruction>Generate the complete technical specification document now, using the provided placeholders as configuration variables.</final_instruction>
#text