import os
from typing import List
import pdfplumber
from docx import Document
def load_txt(path):
with open(path, "r", encoding="utf-8", errors="ignore") as f:
return f.read()
def load_pdf(path):
text = []
with pdfplumber.open(path) as pdf:
for page in pdf.pages:
text.append(page.extract_text() or "")
return "\n".join(text)
def load_docx(path):
doc = Document(path)
return "\n".join([p.text for p in doc.paragraphs])
def read_documents_from_dir(dir_path: str):
docs = []
for fname in sorted(os.listdir(dir_path)):
path = os.path.join(dir_path, fname)
if fname.lower().endswith(".pdf"):
text = load_pdf(path)
elif fname.lower().endswith(".docx"):
text = load_docx(path)
elif fname.lower().endswith(".txt"):
text = load_txt(path)
else:
continue
docs.append({"id": fname, "text": text, "source": fname})
return docs
def chunk_text(text: str, chunk_size: int = 500, overlap: int = 50) -> List[str]:
words = text.split()
chunks = []
i = 0
while i < len(words):
chunk = words[i
This document presents an evaluation rubric that addresses these needs. The rubric examines each publication through four key questions:
What is this about? - Evaluates clarity of purpose and scope
Why does it matter? - Assesses significance and value to readers
Can I trust it? - Examines technical credibility and validation
Can I use it? - Measures practical usability and completeness
By answering these questions systematically, the rubric provides clear criteria for measuring technical quality across different publication types. Authors can use it to create better publications. Reviewers can apply it for consistent evaluation.
1.1 Purpose of the Rubric
Publications on Ready Tensor serve diverse purposes - from advancing research to teaching concepts to documenting solutions. This evaluation rubric ensures each publication effectively serves its purpose by examining four key aspects: clarity of purpose, significance, technical credibility, and practical usability.
Authors can use this rubric to understand what makes their publications effective. By addressing the core questions - what is this about, why does it matter, can I trust it, can I use it - authors ensure their work provides clear value to readers.
The rubric uses a binary scoring system. Each criterion is marked as either met or not met based on specific evidence. This approach provides:
Objective measurement through clear evidence requirements
Consistent evaluation across different reviewers
Specific feedback on areas needing improvement
Easy verification of publication completeness
For publication competitions, this rubric helps identify quality submissions. While meeting these criteria establishes baseline quality, exceptional publications often demonstrate unique insights, innovative approaches, or significant practical impact beyond the baseline requirements.
1.2 Relationship to Publication Best Practices Guide from Ready Tensor
The evaluation rubric works alongside the Ready Tensor Best Practices Guide:
Best Practices Guide
1.3 Using the Evaluation Rubric
The evaluation rubric divides technical publications into different types, each with its own specific evaluation criteria. These publication types and their detailed criteria are covered in later sections of this document.
The rubric uses binary scoring (met/not met) for individual criteria to provide a structured framework for evaluation. While total scores help indicate technical quality and completeness, they should not be used for direct comparisons between different publication types. For example, a research paper scoring 41 out of 45 criteria should not be compared with a tutorial scoring 16 out of 18 criteria, as they serve different purposes and are evaluated against different standards.
Criterion Definition
Evaluates whether the publication explicitly states its core purpose within the first
paragraph or two. The purpose statement must clearly indicate what specific problem
is being solved, what will be learned, or what will be demonstrated. This must appear
in the abstract, tl;dr, introduction, or overview section and be immediately clear
without requiring further reading.
The key differentiator is an explicit, specific purpose statement near the top that
lets readers immediately understand what the publication will deliver.
Scoring Logic
import os
import pickle
from typing import List, Tuple
import numpy as np
import faiss
from backend.embedder import embed_texts
from backend.utils import chunk_text
class SimpleFAISS:
def init(self, dim: int, index_path: str = None):
self.dim = dim
self.index = faiss.IndexFlatIP(dim) # cosine via normalized vectors
self.metadatas = [] # list of dicts for each vector
self.index_path = index_path
def add(self, vectors: np.ndarray, metas: List[dict]):
assert vectors.shape[0] == len(metas)
# normalize for cosine similarity
faiss.normalize_L2(vectors)
self.index.add(vectors)
self.metadatas.extend(metas)
def search(self, vector: np.ndarray, k: int = 5) -> List[Tuple[dict, float]]:
faiss.normalize_L2(vector)
D, I = self.index.search(vector, k)
results = []
for idx, score in zip(I[0], D[0]):
if idx == -1:
continue
results.append((self.metadatas[idx], float(score)))
return results
def save(self, path: str):
data = {
"index": faiss.serialize_index(self.index),
"metadatas": self.metadatas,
"dim": self.dim,
}
with open(path, "wb") as f:
pickle.dump(data, f)
@classmethod
def load(cls, path: str):
with open(path, "rb") as f:
data = pickle.load(f)
obj = cls(dim=data["dim"], index_path=path)
obj.index = faiss.deserialize_index(data["index"])
obj.metadatas = data["metadatas"]
return obj
def build_index_from_docs(docs: List[dict], index_path: str):
"""
docs: list of {"id": str, "text": str, "source": str}
"""
# chunk all documents
all_chunks = []
metas = []
texts = []
for doc in docs:
chunks = chunk_text(doc["text"], chunk_size=500, overlap=50)
for i, c in enumerate(chunks):
texts.append(c)
metas.append({
"source": doc.get("source"),
"doc_id": doc.get("id"),
"chunk_id": i,
"text": c[:200],
})
vecs = embed_texts(texts)
vecs = np.array(vecs).astype("float32")
dim = vecs.shape[1]
store = SimpleFAISS(dim=dim, index_path=index_path)
store.add(vecs, metas)
store.save(index_path)
return store# embedder.py
from sentence_transformers import SentenceTransformer
MODEL_NAME = "all-MiniLM-L6-v2"
_model = None
def get_model():
global _model
if _model is None:
_model = SentenceTransformer(MODEL_NAME)
return _model
def embed_texts(texts):
"""Return list of embeddings for the given list of texts."""
model = get_model()
return model.encode(texts, show_progress_bar=False)
def embed_text(text):
return embed_texts([text])[0]# SmartRAG — Starter
Simple RAG app: upload docs, build FAISS index, ask queries via a simple web UI.
cd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
Put your sample PDFs/TXT/DOCX into backend/sample_docs/
python -m backend.vectorstore build --docs_dir backend/sample_docs --index_path backend/faiss_index.pkl
uvicorn backend.main
--reload --port 8000Open frontend/index.html in browser (or serve it). The frontend talks to http://localhost:8000
Use the demo_script.txt
to record a 2-3 minute demo video. Introduction
Agentic AI ka matlab hai AI system jo apne aap tasks execute kare aur decision le sakta hai, bas human guidance ke saath.
RAG (Retrieval-Augmented Generation) ek AI technique hai jisme LLM (Large Language Model) ko apne training data ke alawa external knowledge diya jata hai, taaki answers accurate aur up-to-date ho.
Introduction
Agentic Artificial Intelligence (Agentic AI) represents a new paradigm in AI system design where intelligent agents are capable of making decisions, performing tasks, and adapting to different contexts with minimal human intervention. Unlike traditional AI models that passively respond to user inputs, Agentic AI systems can actively plan, retrieve relevant information, execute multi-step reasoning, and integrate external tools to achieve specific goals.
import os
from langchain.chat_models import ChatOpenAI
from langchain.chains import RetrievalQA
from langchain.vectorstores import FAISS
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.document_loaders import TextLoader
os.environ["OPENAI_API_KEY"] = "YOUR_API_KEY"
loader = TextLoader("sample_docs.txt")
documents = loader.load()
embeddings = OpenAIEmbeddings()
vectorstore = FAISS.from_documents(documents, embeddings)
retriever = vectorstore.as_retriever()
llm = ChatOpenAI(model="gpt-3.5-turbo")
qa_chain = RetrievalQA.from_chain_type(
llm=llm,
chain_type="stuff",
retriever=retriever
)
query = "What is Agentic AI?"
response = qa_chain.run(query)
print("Answer:", response)
Bold text