PyDxAI AI Agentic Intelligence.. From structured queries to autonomous reasoning

PyDxAI Agentic Intelligence — November 8, 2025 Progress Report

“From structured queries to autonomous reasoning — today PyDxAI learned how to think, not just answer.”

The development of PyDxAI continues to accelerate. What began as a diagnostic reasoning framework has now grown into an agentic intelligence system capable of adaptive reasoning, contextual learning, and safe decision-making in real clinical environments. The latest milestone, achieved on November 8, 2025, represents a leap forward in how the system processes, understands, and refines human language — marking the beginning of a truly autonomous medical AI workflow.


1. The New Foundation: FrontLLM and App3 Sharpened Query

At the heart of today’s progress lies the new FrontLLM preprocessing layer, enhanced with a linguistic cleaner called [App3].
Previously, queries often contained duplication or contextual noise (e.g., “User: … User asks: …”), which degraded retrieval precision. Now, the system automatically sharpened and normalized user input before any retrieval or reasoning steps occur.

Example:

User: Any hormone replacement is better than estrogen?
User asks: Any hormone replacement is better than estrogen?

is now intelligently reduced to:

Cleaned query = Any hormone replacement is better than estrogen?

This simple transformation dramatically improved retriever accuracy, embedding efficiency, and LLM focus, making PyDxAI more responsive and semantically consistent. It also allowed the agent to run cleanly through each reasoning layer without generating redundant embeddings.

Related News  Inside MIKAI: How Retrieval-Augmented Generation (RAG) Makes Medical AI Reliable

2. Triple Memory Architecture in Action

The PyDxAI system now operates with a Triple Memory Framework:

  1. Session Memory — for short-term dialogue coherence
  2. Global Memory — for persistent medical knowledge
  3. Novelty Detector Memory — for identifying new or rare inputs that may require learning or external lookup

During the hormone replacement test case, the system automatically recognized that no prior context existed, retrieved relevant documents from Harrison’s Principles of Internal Medicine 2025, and synthesized a contextual explanation about estrogen therapy and progestin interactions — all while logging each memory segment for potential reuse.

By cleanly separating memory types, PyDxAI can think across sessions yet maintain strict context isolation, a crucial property for safety in medical applications.


3. Autonomic Web Fallback and Discovery Layer

Today marked the first full success of the automatic web discovery system, which activates when the model encounters unknown or misspelled medical terms.

In the query:

Suggest me fghtsumab medicines?

PyDxAI correctly detected “fghtsumab” as an unknown entity and triggered an external search. The engine accessed multiple providers (Brave and Yahoo) and gracefully handled DNS errors from Wikipedia, returning structured summaries to the RAG (Retrieval-Augmented Generation) layer.

Instead of hallucinating a nonexistent drug, PyDxAI generated a cautious and responsible answer:

“The term ‘fghtsumab’ appears to be a typographical error. If you meant a monoclonal antibody such as efgartigimod or belimumab, please clarify.”

This is an example of agentic reasoning — the model not only recognized uncertainty but actively sought clarification while maintaining medical accuracy and safety.


4. Unified RAG + Promptbook Integration

The Retrieval-Augmented Generation (RAG) system now seamlessly integrates local medical knowledge with real-time web data, structured through the new Promptbook template.
Every request follows a clearly defined format:

  • System Rules: Safety, accuracy, and bilingual medical compliance
  • Memory Context: Session and global recall
  • RAG Context: Local documents + web snippets
  • Question → Answer Pair: Precise alignment for the LLM
Related News  The hierarchy of Artificial Intelligence (AI)

This architecture ensures that PyDxAI operates like a clinical reasoning engine rather than a simple chatbot. Each answer is based on retrieved evidence, then refined by a reasoning model (currently powered by Mistral-Q4_K_M and DeepSeek R1 13B Qwen for dual-LLM reasoning).


5. Advanced Logging and Explainability

For every query, the backend now records:

  • Retriever sources and document previews
  • Embedding vector shapes and lengths
  • Novelty detection results
  • Web-fallback status
  • Memory saving confirmation (session + global)

An example log snippet:

📚 Retrieved 3 context docs for query='Any hormone replacement is better than estrogen?'
🧩 Novelty check: max_sim=0.78, threshold=0.70
✅ Memory saved id=188  scope=session  summary=Any hormone replacement is better than estrogen?

This transparency enables full traceability — every AI conclusion can be audited from query to answer, an essential step toward clinical-grade safety.


6. Agentic Behavior Emerging

The day’s most significant observation was not a line of code, but a behavior.

When faced with an uncertain input, PyDxAI didn’t simply fail — it adapted:

  • Detected an unknown token
  • Triggered self-correction via search
  • Retrieved new knowledge
  • Formulated a probabilistic hypothesis
  • Requested user clarification

This is the essence of agentic AI — systems that can act, reason, and reflect.
PyDxAI now shows early signs of autonomy, capable of self-repairing its understanding pipeline and making informed decisions about when to seek external data.


7. What’s Next

The roadmap from today’s success includes:

  1. Auto-embedding repair patch — to handle vector shape mismatches seamlessly
  2. Feedback-based self-learning loop — where user or model feedback refines memory entries
  3. Contextual Safety Layer (CSL) — to detect high-risk clinical terms and enforce cautionary responses
  4. MIRAI Integration — bridging PyDxAI with the MIRAI intelligence network for continuous medical knowledge evolution
Related News  Building MIKAI: The Journey of Developing a Doctor’s Own AI Language Model

Together, these will complete the Autonomous Medical Reasoning Core, turning PyDxAI from a reactive tool into a continuously learning assistant.


8. Summary: A New Cognitive Milestone

Today’s session marked a quiet but profound milestone:
PyDxAI is no longer just a retrieval-based system — it has begun to reason like a clinician.

It interprets unclear questions, searches intelligently, and formulates context-aware, evidence-based responses. The logs show not just computations, but cognition — a structured process of perception, analysis, and adaptation.

Each layer, from query sharpening to RAG synthesis, now contributes to a unified intelligence loop — the same cognitive pattern that defines human problem-solving. With these capabilities, PyDxAI stands closer than ever to its mission:
to become the safest, most intelligent, and most transparent diagnostic AI system built for medicine.

Add a Comment

You must be logged in to post a comment