Skip to content

Instantly share code, notes, and snippets.

View celeroncoder's full-sized avatar
:octocat:
Goofing around

Khushal Bhardwaj celeroncoder

:octocat:
Goofing around
View GitHub Profile

Offline RAG Assistant: A Comparative Benchmark Report

1. Comparative Benchmark Analysis

A critical weakness is the lack of direct comparative benchmarks against the three most relevant alternative frameworks.

1.1. llama.cpp

llama.cpp is the standard for local LLM inference and serves as a key performance baseline. When it comes to prompt processing, llama.cpp significantly outperforms the assistant, achieving 137-189 tokens/s in batch mode compared to the assistant's 8.10 tokens/s—a roughly 15x performance gap that's likely due to Python/FastAPI overhead compared to llama.cpp's native C++ implementation [1]. However, token generation performance is much more comparable, with the assistant reaching 9.19 tokens/s versus llama.cpp's 9-18 tokens/s range. One advantage of llama.cpp is its minimal deployment overhead through a single binary, making it straightforward to set up and run.

@celeroncoder
celeroncoder / bm25search-database.md
Last active September 4, 2025 07:06
bm25search-database

Looking at your schema, I can see the actual structure is:

knowledgebase_entries (tenant_id, nucleus_id) → kb_contentkb_blocks (content)

Here are the only changes needed for your Prisma schema to support full-text search:

Prisma Schema Changes

model kb_blocks {
@celeroncoder
celeroncoder / add_secrets.sh
Last active May 19, 2025 07:38
setting env secrets to github repos
#!/bin/bash
# Default values
ORIGIN="origin"
ENV_FILE=""
GH_ENV=""
# Parse command line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
#!/bin/bash
# Thresholds
LOW_BATTERY_THRESHOLD=30
UNPLUG_THRESHOLD=80
NOTIFICATION_INTERVAL=10
# Track the last notified percentage
last_notified_percentage=100
#!/bin/bash
# Check if .env file exists
if [ ! -f .env ]; then
echo ".env file not found!"
exit 1
fi
# Read the repository name and owner
REPO="your-username/your-repo" # Change this to your GitHub repo
@celeroncoder
celeroncoder / script.js
Created January 16, 2024 14:34
GDSC VIT Bhopal WinterFest Gamification of Web - JS Code for Flappy Bird
var block = document.getElementById("block");
var hole = document.getElementById("hole");
var score = document.getElementById("score");
var start = document.getElementById("start");
var restart = document.getElementById("restart");
var modal = document.getElementById("modal");
var root = document.querySelector(":root");
var character = document.getElementById("character");
var jumping = 0;
var counter = 0;
@celeroncoder
celeroncoder / style.css
Created January 16, 2024 14:15
GDSC VIT Bhopal WinterFest Gamification of Web - CSS Code for Flappy Bird
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
.gamestartbg {
--frame1: url("/images/fly-frame-1.png");
--frame2: url("/images/fly-frame-2.png");
}
body{
width: 100vw;
height: 100vh;
@celeroncoder
celeroncoder / index.html
Created January 16, 2024 13:57
GDSC VIT Bhopal WinterFest Gamification of Web - HTML Code for Flappy Bird
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/x-icon" href="https://img.icons8.com/avantgarde/100/bird.png">
<title>Flappy Bird Game</title>
</head>
@celeroncoder
celeroncoder / GDSC-Team-Recruitment-Web-Domain-Task-Round-GuideLines.md
Created December 22, 2023 15:56
GDSC-Team-Recruitment-Web-Domain-Task-Round-GuideLines

Follow this guidelines for the TODO API:

Create the following routes:

  1. GET ALL Todos [GET /todo]
    • Response:
      {
        "data": [
          {
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons