Subir archivos a "/"

This commit is contained in:
2026-08-15 15:16:53 +02:00
commit f3c20fd619
2 changed files with 369 additions and 0 deletions
+102
View File
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SRag | Efficient Retrieval-Augmented Generation</title>
<meta name="description" content="SRag is a modern and lightweight RAG (Retrieval-Augmented Generation) implementation designed for efficient document parsing and contextual AI queries.">
<meta name="author" content="Juan Raul Rodriguez Gil">
<link rel="stylesheet" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Fira+Code&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<section class="hero">
<div class="badge" id="hero-badge">AI / RAG Architecture</div>
<h1 id="hero-title">SRag</h1>
<p id="hero-desc">A modern, lightweight implementation for Retrieval-Augmented Generation. SRag streamlines the connection between your document embeddings and Large Language Models.</p>
<div class="hero-buttons">
<a href="https://github.com/jrodriiguezg/SRag" target="_blank" rel="noopener noreferrer" class="btn btn-primary">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
View on GitHub
</a>
<a href="https://jrodriiguezg.link" class="btn btn-secondary">Back to Portfolio</a>
<a href="https://ko-fi.com/jrodriiguezg" target="_blank" rel="noopener noreferrer" class="btn btn-kofi">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734 4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09-.443-.441-3.368-3.049-4.051-3.954-1.094-1.465-1.083-3.262 0-4.198 1.116-.916 2.79-.843 3.995.212.352.312.593.636.593.636s.202-.308.514-.6A4.331 4.331 0 0 1 12.87 8.07c1.196-.906 2.87-.978 3.996-.061 1.083.936 1.094 2.733 0 4.198z"/></svg>
Support on Ko-fi
</a>
</div>
</section>
<div class="content-section">
<section class="glass-panel">
<h2 class="section-title">How it Works</h2>
<div class="grid-2">
<div>
<p style="color: var(--text-secondary); margin-bottom: 1rem;">SRag simplifies the vectorization pipeline. It ingests your data, creates optimized embeddings, and provides a clean API for semantic retrieval.</p>
<ul class="tech-list">
<li><strong>Ingestion Engine:</strong> Automatically parses text, PDFs, and Markdown files into manageable chunks.</li>
<li><strong>Vectorization:</strong> Generates dense embeddings optimized for rapid semantic search.</li>
<li><strong>Query Router:</strong> Intercepts user prompts, retrieves relevant context, and augments the LLM input seamlessly.</li>
</ul>
</div>
<div class="code-block">
<span class="code-keyword">import</span> os
<span class="code-keyword">from</span> llama_index.core <span class="code-keyword">import</span> VectorStoreIndex, SimpleDirectoryReader, Settings
<span class="code-keyword">from</span> llama_index.llms.ollama <span class="code-keyword">import</span> Ollama
<span class="code-keyword">from</span> llama_index.embeddings.ollama <span class="code-keyword">import</span> OllamaEmbedding
<span class="code-comment"># Setup local models via Ollama</span>
Settings.llm = Ollama(model=<span class="code-string">"qwen2.5:7b"</span>, request_timeout=120.0)
Settings.embed_model = OllamaEmbedding(model_name=<span class="code-string">"nomic-embed-text"</span>)
<span class="code-comment"># Load documents and generate vector index</span>
documents = SimpleDirectoryReader(<span class="code-string">"docs"</span>).load_data()
index = VectorStoreIndex.from_documents(documents)
<span class="code-comment"># Initialize strict context-based chat engine</span>
chat_engine = index.as_chat_engine(
chat_mode=<span class="code-string">"context"</span>,
similarity_top_k=20,
verbose=False
)
</div>
</section>
<section class="glass-panel">
<h2 class="section-title">Core Architecture</h2>
<div class="hardware-grid">
<div class="hardware-card">
<h4>Embeddings</h4>
<p>Support for local models via HuggingFace or external APIs like OpenAI.</p>
</div>
<div class="hardware-card">
<h4>Vector DB</h4>
<p>Lightweight and in-memory persistent storage for ultra-fast document retrieval.</p>
</div>
<div class="hardware-card">
<h4>LLM Agnostic</h4>
<p>Compatible with Ollama for local inference or any standard API backend.</p>
</div>
</div>
</section>
</div>
<footer>
<p>&copy; 2026 Juan Raul Rodriguez Gil. Built with passion for Linux & AI. <br>
<a href="https://jrodriiguezg.link" class="footer-link">jrodriiguezg.link</a> |
<a href="https://www.instagram.com/jrodriiguezg.link/?hl=es" target="_blank" rel="noopener noreferrer" class="footer-link">Instagram</a>
</p>
</footer>
</div>
</body>
</html>