ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/AI_Brain / tests/test_knowledge_pipeline.py

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/AI_Brain / tests/test_knowledge_pipeline.py
DateNot specified in source
RepositoryJanady13/AI_Brain
Revision50285aff347685f043e7a72e4d72891eebaa6cd6
Branchcodex/build-online-github-ani-hrtsoc
Path or archive membertests/test_knowledge_pipeline.py
Original SHA-256fbda17696e2ac78eb983203c932c269e3e9dd2392cfb9345e237218243f402db
Git blob SHA1e1da0b77cd2db84f023e594b86feaced5301e88
Reading-copy SHA-256fbda17696e2ac78eb983203c932c269e3e9dd2392cfb9345e237218243f402db

Original source ↗

Every recorded occurrence

These 9 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycodex/build-online-github-ani-hrtsoc50285aff347685f043e7a72e4d72891eebaa6cd6Open original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycodex/build-online-github-ani-7v4kug5cd0bbf744b0aee9445913337e852889d9a8098eOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycopilot/vscode17602838959829e1c1a5b171addb5bb4a83b2ea7dede50c1cc81eOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pyfeature/seeder-engine-testscdb497ece2d1a770ca8c83eb1de8923cfaa9ecebOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycodex/build-online-github-ani-7nmb21d0f50071c85cddaaebbf9c4dd1313bd7676986daOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycodex/build-online-github-ani-7v4kug5cd0bbf744b0aee9445913337e852889d9a8098eOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycopilot/vscode17602838959829e1c1a5b171addb5bb4a83b2ea7dede50c1cc81eOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pyfeature/seeder-engine-testscdb497ece2d1a770ca8c83eb1de8923cfaa9ecebOpen original
Janady13/AI_Brain / tests/test_knowledge_pipeline.pycodex/build-online-github-ani-hrtsoc50285aff347685f043e7a72e4d72891eebaa6cd6Open original

Recovered source transcript

"""Unit tests for the lightweight RAG/KAG demonstration module.""" from services.knowledge_pipeline import ( KnowledgeGraph, KnowledgeWorkflowOrchestrator, RAGPipeline, run_demo, ) def test_rag_pipeline_indexes_and_retrieves_documents() -> None: pipeline = RAGPipeline(chunk_token_limit=20) pipeline.index({ "doc-1": "RAG pipelines rely on document indexing and vector stores.", "doc-2": "Knowledge graphs organise entities for reasoning.", }) results = pipeline.search("How do RAG pipelines work?", limit=1) assert len(results) == 1 assert results[0].doc_id == "doc-1" assert "vector stores" in results[0].text.lower() def test_knowledge_graph_returns_related_edges() -> None: graph = KnowledgeGraph() graph.add_fact("rag", "stores_in", "vector_db", evidence="Vector DB keeps embeddings queryable.") graph.add_fact("kag", "aligns", "knowledge_graph", evidence="Knowledge graph maintains governance.") matches = graph.reason("Which vector_db backs the rag pipeline?") assert len(matches) == 1 assert matches[0].source == "rag" assert matches[0].target == "vector_db" def test_orchestrator_combines_rag_and_graph_results() -> None: pipeline = RAGPipeline(chunk_token_limit=40) pipeline.index({ "doc": "Cache augmented generation preloads knowledge so retrieval stays instant.", }) graph = KnowledgeGraph() graph.add_fact("agent_loop", "includes", "reflection", evidence="Reflection improves outcomes.") orchestrator = KnowledgeWorkflowOrchestrator(rag=pipeline, graph=graph) answer = orchestrator.answer("How does the agent loop include reflection for cache workflows?", limit=1) assert answer.rag_context assert "cache augmented" in answer.rag_context[0].lower() assert any(edge.target == "reflection" for edge in answer.knowledge_edges) def test_run_demo_uses_repository_datasets() -> None: answer = run_demo("Which workflows activate the moe router?", limit=2) assert answer.rag_context # dataset-backed narrative should surface # Demo graph encodes a moe_router -> stripe edge which should be returned assert any(edge.source == "moe_router" for edge in answer.knowledge_edges)

Search equations, builds, manuscript text, and recovered sources.