Skip to content

Instantly share code, notes, and snippets.

@sharabash
sharabash / hnsw-pre-filter-problem.md
Last active December 18, 2025 11:47
More on the HNSW pre-versus-post filter dilemma

This is a well-documented known tension that all HNSW vector stores have to account for and deal with.

https://arxiv.org/abs/2403.04871

HNSW builds a navigable graph over all vectors. Its "small world" property assumes you can traverse from any node to any other in ~log(N) hops.

When you pre-filter: Graph query: posts with tag "tafsir" → 500 posts Vector search: k-NN among those 500

@sharabash
sharabash / TigerVector-vs-External-Vector-Store-for-QuranReflect.md
Last active December 18, 2025 15:17
TigerVector vs External Vector Store for QuranReflect's Semantic Search

TigerVector vs External Vector Store for QuranReflect's Semantic Search

TL;DR

Recommendation: Use TigerVector, but with operational safeguards

The operational concerns raised (memory pressure, index rebuilds, coupling) are valid but manageable. The architectural problems with an external vector store are fundamental and unavoidable.

  • One query = graph traversal + vector search (no two-hop problem)
  • Zero sync complexity — no cascading update nightmares when users/tags change
@sharabash
sharabash / gist:d88b267a7fce95fddb1ebbf1c7d8bcfa
Created December 18, 2025 10:45
addressed tigervector pushback
# 📋 MCP Semantic Search Integration: TigerVector vs External Vector Store
## TL;DR
**Recommendation: Use TigerVector, but with operational safeguards**
The operational concerns raised (memory pressure, index rebuilds, coupling) are valid but manageable. The architectural problems with an external vector store are fundamental and unavoidable.
- ✅ **One query** = graph traversal + vector search (no two-hop problem)
- ✅ **Zero sync complexity** — no cascading update nightmares when users/tags change
resource "aws_autoscaling_policy" "cz02_down" {
name = "webserver-${var.environment}-ondemand-cz02-down-${var.timestamp}"
policy_type = "SimpleScaling"
adjustment_type = "ChangeInCapacity"
autoscaling_group_name = "${aws_autoscaling_group.cz02.name}"
cooldown = 600
scaling_adjustment = -1
lifecycle {
ignore_changes = ["name"]
}
" Author: Nour Sharabash
" Objective: Perfection
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
@sharabash
sharabash / .vimrc
Created October 3, 2011 07:57
my best .vimrc ever, so great I had to save it online
" Author: Nour Sharabash
" Objective: Perfection
function TabLeft()
let tab_num = tabpagenr() - 1
if tab_num == 0
execute 'tabm' tabpagenr('$') - 1
else
execute 'tabm' tab_num - 1
endif
@sharabash
sharabash / gist:1242189
Created September 26, 2011 13:04
cross network abstracted api model
package Quran::Model::Social::Network::API::Google::Buzz;
use Moose;
use namespace::autoclean;
extends 'Catalyst::Model';
sub post {}
sub post_GET {
my ($self, $rest, $c) = (shift, shift, shift);
@sharabash
sharabash / gist:1242187
Created September 26, 2011 13:03
cross network abstracted api controller
package Quran::Controller::Account::Network::API;
use Moose;
use namespace::autoclean;
BEGIN { extends 'Catalyst::Controller::REST' }
__PACKAGE__->config(
default => 'text/javascript',
map => {
'text/javascript' => 'JSON'
@sharabash
sharabash / gist:1242183
Created September 26, 2011 13:01
cross network oauth authentication
package Quran::Controller::Account::Network::Auth;
use Moose;
use namespace::autoclean;
use OAuth::Lite::Token;
use OAuth::Lite::Consumer;
use OAuth::Lite2::Client::WebServer;
BEGIN { extends 'Catalyst::Controller' }