Draft
Refactor extraction to frame-first knowledge base architecture with per-batch evidence-backed frames#1
Conversation
Agent-Logs-Url: https://github.com/theAfish/mat_know_base/sessions/44e21d26-a66f-4f95-b2f7-ce3ad61e2577 Co-authored-by: theAfish <85424334+theAfish@users.noreply.github.com>
Agent-Logs-Url: https://github.com/theAfish/mat_know_base/sessions/44e21d26-a66f-4f95-b2f7-ce3ad61e2577 Co-authored-by: theAfish <85424334+theAfish@users.noreply.github.com>
Agent-Logs-Url: https://github.com/theAfish/mat_know_base/sessions/44e21d26-a66f-4f95-b2f7-ce3ad61e2577 Co-authored-by: theAfish <85424334+theAfish@users.noreply.github.com>
Agent-Logs-Url: https://github.com/theAfish/mat_know_base/sessions/44e21d26-a66f-4f95-b2f7-ce3ad61e2577 Co-authored-by: theAfish <85424334+theAfish@users.noreply.github.com>
Agent-Logs-Url: https://github.com/theAfish/mat_know_base/sessions/44e21d26-a66f-4f95-b2f7-ce3ad61e2577 Co-authored-by: theAfish <85424334+theAfish@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor database logic for knowledge base frame creation
Refactor extraction to frame-first knowledge base architecture with per-batch evidence-backed frames
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change shifts extraction from directly writing graph structures to building a canonical knowledge base frame per research package (batch), using preprocessed LLM-readable inputs as the primary source. Each frame now stores detailed scientific content and extraction metadata (checks/timestamps/source links), enabling downstream database and KG generation from a stable intermediate representation.
Schema: introduce per-batch knowledge frames
knowledge_base_framestable/model (KnowledgeBaseFrame) with:ingestion_batches(batch_idunique)frame_data) forconcepts,experimental_data,statements,related_dataframe_metadata,check_count,first_extracted_at,last_extracted_at,status)004_add_knowledge_base_frames.py.Agent tools: frame construction + evidence normalization
initialize_knowledge_frame(batch_id, title)add_knowledge_frame_items(batch_id, section, items, evidence_level, source_asset_id)mark_knowledge_frame_checked(batch_id, summary)mark_batch_extracted(...)delegate to frame completion.Extraction runtime flow: frame-first orchestration
Operational consistency in CLI flows
clear-knowledgeandpurgenow includeknowledge_base_framescleanup/reset to keep state aligned with node/edge deletion semantics.Example: writing evidence-backed frame items
Original prompt
Created from VS Code.