@wanshi-kg/wanshi 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +458 -0
- package/dist/__tests__/helpers.js +27 -0
- package/dist/__tests__/helpers.js.map +1 -0
- package/dist/cli/commands/export.command.js +99 -0
- package/dist/cli/commands/export.command.js.map +1 -0
- package/dist/cli/commands/index.js +22 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/inspectMerges.command.js +84 -0
- package/dist/cli/commands/inspectMerges.command.js.map +1 -0
- package/dist/cli/commands/metrics.command.js +196 -0
- package/dist/cli/commands/metrics.command.js.map +1 -0
- package/dist/cli/commands/process.command.js +82 -0
- package/dist/cli/commands/process.command.js.map +1 -0
- package/dist/cli/commands/watch.command.js +91 -0
- package/dist/cli/commands/watch.command.js.map +1 -0
- package/dist/cli/index.js +269 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/optionsToConfig.js +160 -0
- package/dist/cli/optionsToConfig.js.map +1 -0
- package/dist/config/index.js +59 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/legacyHints.js +113 -0
- package/dist/config/legacyHints.js.map +1 -0
- package/dist/config/schema.js +803 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/ui.js +221 -0
- package/dist/config/ui.js.map +1 -0
- package/dist/core/DirectoryProcessor.js +725 -0
- package/dist/core/DirectoryProcessor.js.map +1 -0
- package/dist/core/adapters/IStructuredAdapter.js +3 -0
- package/dist/core/adapters/IStructuredAdapter.js.map +1 -0
- package/dist/core/adapters/SqliteAdapter.js +267 -0
- package/dist/core/adapters/SqliteAdapter.js.map +1 -0
- package/dist/core/adapters/StructuredAdapterRegistry.js +31 -0
- package/dist/core/adapters/StructuredAdapterRegistry.js.map +1 -0
- package/dist/core/adapters/index.js +20 -0
- package/dist/core/adapters/index.js.map +1 -0
- package/dist/core/checkpoint/CheckpointService.js +188 -0
- package/dist/core/checkpoint/CheckpointService.js.map +1 -0
- package/dist/core/checkpoint/index.js +18 -0
- package/dist/core/checkpoint/index.js.map +1 -0
- package/dist/core/corpus/CorpusAnalyzer.js +266 -0
- package/dist/core/corpus/CorpusAnalyzer.js.map +1 -0
- package/dist/core/corpus/CorpusProfileStore.js +92 -0
- package/dist/core/corpus/CorpusProfileStore.js.map +1 -0
- package/dist/core/corpus/index.js +21 -0
- package/dist/core/corpus/index.js.map +1 -0
- package/dist/core/corpus/normalizeGlossary.js +60 -0
- package/dist/core/corpus/normalizeGlossary.js.map +1 -0
- package/dist/core/corpus/relPath.js +52 -0
- package/dist/core/corpus/relPath.js.map +1 -0
- package/dist/core/corpus/termFrequency.js +86 -0
- package/dist/core/corpus/termFrequency.js.map +1 -0
- package/dist/core/cost/CostMeter.js +235 -0
- package/dist/core/cost/CostMeter.js.map +1 -0
- package/dist/core/cost/index.js +19 -0
- package/dist/core/cost/index.js.map +1 -0
- package/dist/core/cost/prices.js +38 -0
- package/dist/core/cost/prices.js.map +1 -0
- package/dist/core/cv/ObjectDetectionService.js +119 -0
- package/dist/core/cv/ObjectDetectionService.js.map +1 -0
- package/dist/core/di/ContainerFactory.js +670 -0
- package/dist/core/di/ContainerFactory.js.map +1 -0
- package/dist/core/di/DIContainer.js +103 -0
- package/dist/core/di/DIContainer.js.map +1 -0
- package/dist/core/di/index.js +19 -0
- package/dist/core/di/index.js.map +1 -0
- package/dist/core/errors/CustomErrors.js +342 -0
- package/dist/core/errors/CustomErrors.js.map +1 -0
- package/dist/core/errors/index.js +18 -0
- package/dist/core/errors/index.js.map +1 -0
- package/dist/core/export/KnowledgeGraphExportService.js +56 -0
- package/dist/core/export/KnowledgeGraphExportService.js.map +1 -0
- package/dist/core/export/index.js +19 -0
- package/dist/core/export/index.js.map +1 -0
- package/dist/core/export/strategies/GraphitiExportStrategy.js +115 -0
- package/dist/core/export/strategies/GraphitiExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/GraphvizDotExportStrategy.js +331 -0
- package/dist/core/export/strategies/GraphvizDotExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/IExportStrategy.js +3 -0
- package/dist/core/export/strategies/IExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/JsonExportStrategy.js +19 -0
- package/dist/core/export/strategies/JsonExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/JsonlExportStrategy.js +69 -0
- package/dist/core/export/strategies/JsonlExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/KblamExportStrategy.js +36 -0
- package/dist/core/export/strategies/KblamExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/LoraExportStrategy.js +46 -0
- package/dist/core/export/strategies/LoraExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/McpExportStrategy.js +67 -0
- package/dist/core/export/strategies/McpExportStrategy.js.map +1 -0
- package/dist/core/export/strategies/index.js +25 -0
- package/dist/core/export/strategies/index.js.map +1 -0
- package/dist/core/export/strategies/kbTriples.js +60 -0
- package/dist/core/export/strategies/kbTriples.js.map +1 -0
- package/dist/core/index.js +22 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/knowledge/KnowledgeGraphBuilder.js +627 -0
- package/dist/core/knowledge/KnowledgeGraphBuilder.js.map +1 -0
- package/dist/core/knowledge/MergeRecord.js +3 -0
- package/dist/core/knowledge/MergeRecord.js.map +1 -0
- package/dist/core/knowledge/canon/Canonicalizer.js +414 -0
- package/dist/core/knowledge/canon/Canonicalizer.js.map +1 -0
- package/dist/core/knowledge/canon/index.js +18 -0
- package/dist/core/knowledge/canon/index.js.map +1 -0
- package/dist/core/knowledge/contradiction/HeuristicContradictionChecker.js +92 -0
- package/dist/core/knowledge/contradiction/HeuristicContradictionChecker.js.map +1 -0
- package/dist/core/knowledge/contradiction/LlmContradictionChecker.js +52 -0
- package/dist/core/knowledge/contradiction/LlmContradictionChecker.js.map +1 -0
- package/dist/core/knowledge/contradiction/index.js +19 -0
- package/dist/core/knowledge/contradiction/index.js.map +1 -0
- package/dist/core/knowledge/grounding/KeywordGroundingChecker.js +33 -0
- package/dist/core/knowledge/grounding/KeywordGroundingChecker.js.map +1 -0
- package/dist/core/knowledge/grounding/MiniCheckGroundingChecker.js +82 -0
- package/dist/core/knowledge/grounding/MiniCheckGroundingChecker.js.map +1 -0
- package/dist/core/knowledge/grounding/index.js +20 -0
- package/dist/core/knowledge/grounding/index.js.map +1 -0
- package/dist/core/knowledge/grounding/verbalize.js +38 -0
- package/dist/core/knowledge/grounding/verbalize.js.map +1 -0
- package/dist/core/knowledge/images/imageMetaGraph.js +136 -0
- package/dist/core/knowledge/images/imageMetaGraph.js.map +1 -0
- package/dist/core/knowledge/index.js +20 -0
- package/dist/core/knowledge/index.js.map +1 -0
- package/dist/core/knowledge/merging/KnowledgeMerger.js +624 -0
- package/dist/core/knowledge/merging/KnowledgeMerger.js.map +1 -0
- package/dist/core/knowledge/references/ReferenceResolver.js +184 -0
- package/dist/core/knowledge/references/ReferenceResolver.js.map +1 -0
- package/dist/core/knowledge/references/citations/CitationEvidenceProcessor.js +401 -0
- package/dist/core/knowledge/references/citations/CitationEvidenceProcessor.js.map +1 -0
- package/dist/core/knowledge/references/citations/CitationResolver.js +95 -0
- package/dist/core/knowledge/references/citations/CitationResolver.js.map +1 -0
- package/dist/core/knowledge/references/citations/GrobidClient.js +143 -0
- package/dist/core/knowledge/references/citations/GrobidClient.js.map +1 -0
- package/dist/core/knowledge/references/citations/TitleIdResolver.js +101 -0
- package/dist/core/knowledge/references/citations/TitleIdResolver.js.map +1 -0
- package/dist/core/knowledge/references/web/FetchCacheService.js +114 -0
- package/dist/core/knowledge/references/web/FetchCacheService.js.map +1 -0
- package/dist/core/knowledge/references/web/GatedFetcher.js +228 -0
- package/dist/core/knowledge/references/web/GatedFetcher.js.map +1 -0
- package/dist/core/knowledge/references/web/WebReferenceProcessor.js +164 -0
- package/dist/core/knowledge/references/web/WebReferenceProcessor.js.map +1 -0
- package/dist/core/knowledge/search/KnowledgeGraphSearch.js +261 -0
- package/dist/core/knowledge/search/KnowledgeGraphSearch.js.map +1 -0
- package/dist/core/knowledge/vocabulary.js +162 -0
- package/dist/core/knowledge/vocabulary.js.map +1 -0
- package/dist/core/llm/EmbeddingService.js +113 -0
- package/dist/core/llm/EmbeddingService.js.map +1 -0
- package/dist/core/llm/OllamaService.js +146 -0
- package/dist/core/llm/OllamaService.js.map +1 -0
- package/dist/core/llm/OpenAICompatibleService.js +190 -0
- package/dist/core/llm/OpenAICompatibleService.js.map +1 -0
- package/dist/core/llm/OpenAIEmbeddingService.js +129 -0
- package/dist/core/llm/OpenAIEmbeddingService.js.map +1 -0
- package/dist/core/llm/embeddingUtils.js +25 -0
- package/dist/core/llm/embeddingUtils.js.map +1 -0
- package/dist/core/llm/index.js +23 -0
- package/dist/core/llm/index.js.map +1 -0
- package/dist/core/llm/prompts/PromptManager.js +388 -0
- package/dist/core/llm/prompts/PromptManager.js.map +1 -0
- package/dist/core/llm/prompts/PromptTemplateEngine.js +257 -0
- package/dist/core/llm/prompts/PromptTemplateEngine.js.map +1 -0
- package/dist/core/llm/prompts/templates/partials/examples/EXAMPLE_STYLE_GUIDE.md +84 -0
- package/dist/core/llm/prompts/templates/partials/examples/article.md +187 -0
- package/dist/core/llm/prompts/templates/partials/examples/code.md +229 -0
- package/dist/core/llm/prompts/templates/partials/examples/communication.md +205 -0
- package/dist/core/llm/prompts/templates/partials/examples/documentation.md +262 -0
- package/dist/core/llm/prompts/templates/partials/examples/financial.md +157 -0
- package/dist/core/llm/prompts/templates/partials/examples/legal.md +153 -0
- package/dist/core/llm/prompts/templates/partials/examples/logs.md +127 -0
- package/dist/core/llm/prompts/templates/partials/examples/medical.md +218 -0
- package/dist/core/llm/prompts/templates/partials/examples/notes.md +201 -0
- package/dist/core/llm/prompts/templates/partials/examples/research.md +208 -0
- package/dist/core/llm/prompts/templates/partials/examples/tabular.md +178 -0
- package/dist/core/llm/prompts/templates/partials/examples/transcript.md +204 -0
- package/dist/core/llm/prompts/templates/partials/retrieved-context.hbs +18 -0
- package/dist/core/llm/prompts/templates/v1/system.hbs +371 -0
- package/dist/core/llm/prompts/templates/v1/user.hbs +20 -0
- package/dist/core/llm/prompts/templates/v2/system.hbs +573 -0
- package/dist/core/llm/prompts/templates/v2/user.hbs +20 -0
- package/dist/core/llm/prompts/templates/v3/system.hbs +861 -0
- package/dist/core/llm/prompts/templates/v3/user.hbs +16 -0
- package/dist/core/llm/prompts/templates/v4/system.hbs +800 -0
- package/dist/core/llm/prompts/templates/v4/user.hbs +40 -0
- package/dist/core/llm/prompts/templates/v4.5/system.hbs +71 -0
- package/dist/core/llm/prompts/templates/v4.5/user.hbs +46 -0
- package/dist/core/llm/prompts/templates/v5/glossary/system.hbs +40 -0
- package/dist/core/llm/prompts/templates/v5/glossary/user.hbs +11 -0
- package/dist/core/llm/prompts/templates/v5/system.hbs +163 -0
- package/dist/core/llm/prompts/templates/v5/user.hbs +55 -0
- package/dist/core/pipeline/GroundingTransform.js +52 -0
- package/dist/core/pipeline/GroundingTransform.js.map +1 -0
- package/dist/core/pipeline/PipelineRunner.js +51 -0
- package/dist/core/pipeline/PipelineRunner.js.map +1 -0
- package/dist/core/pipeline/RelationFilterTransform.js +72 -0
- package/dist/core/pipeline/RelationFilterTransform.js.map +1 -0
- package/dist/core/pipeline/index.js +20 -0
- package/dist/core/pipeline/index.js.map +1 -0
- package/dist/core/processor/FileProcessor.js +184 -0
- package/dist/core/processor/FileProcessor.js.map +1 -0
- package/dist/core/processor/ProcessedRegistry.js +38 -0
- package/dist/core/processor/ProcessedRegistry.js.map +1 -0
- package/dist/core/processor/ast/AstSeedService.js +0 -0
- package/dist/core/processor/ast/AstSeedService.js.map +1 -0
- package/dist/core/processor/ast/AstSymbolStore.js +110 -0
- package/dist/core/processor/ast/AstSymbolStore.js.map +1 -0
- package/dist/core/processor/ast/index.js +19 -0
- package/dist/core/processor/ast/index.js.map +1 -0
- package/dist/core/processor/chunking/TextChunker.js +98 -0
- package/dist/core/processor/chunking/TextChunker.js.map +1 -0
- package/dist/core/processor/chunking/index.js +18 -0
- package/dist/core/processor/chunking/index.js.map +1 -0
- package/dist/core/processor/classifier/CONTENT_CLASSES.js +294 -0
- package/dist/core/processor/classifier/CONTENT_CLASSES.js.map +1 -0
- package/dist/core/processor/classifier/CascadeContentClassifier.js +107 -0
- package/dist/core/processor/classifier/CascadeContentClassifier.js.map +1 -0
- package/dist/core/processor/classifier/HeuristicContentClassifier.js +113 -0
- package/dist/core/processor/classifier/HeuristicContentClassifier.js.map +1 -0
- package/dist/core/processor/classifier/IContentTypeClassifier.js +3 -0
- package/dist/core/processor/classifier/IContentTypeClassifier.js.map +1 -0
- package/dist/core/processor/classifier/LlmContentClassifier.js +107 -0
- package/dist/core/processor/classifier/LlmContentClassifier.js.map +1 -0
- package/dist/core/processor/classifier/NER_DOMAIN_EXAMPLES.js +498 -0
- package/dist/core/processor/classifier/NER_DOMAIN_EXAMPLES.js.map +1 -0
- package/dist/core/processor/classifier/index.js +21 -0
- package/dist/core/processor/classifier/index.js.map +1 -0
- package/dist/core/processor/classifier/mergeClassifications.js +32 -0
- package/dist/core/processor/classifier/mergeClassifications.js.map +1 -0
- package/dist/core/processor/index.js +20 -0
- package/dist/core/processor/index.js.map +1 -0
- package/dist/core/processor/readers/AudioReader.js +462 -0
- package/dist/core/processor/readers/AudioReader.js.map +1 -0
- package/dist/core/processor/readers/BinaryReader.js +90 -0
- package/dist/core/processor/readers/BinaryReader.js.map +1 -0
- package/dist/core/processor/readers/ChandraPdfReader.js +187 -0
- package/dist/core/processor/readers/ChandraPdfReader.js.map +1 -0
- package/dist/core/processor/readers/ChatExportReader.js +365 -0
- package/dist/core/processor/readers/ChatExportReader.js.map +1 -0
- package/dist/core/processor/readers/DoclingReader.js +445 -0
- package/dist/core/processor/readers/DoclingReader.js.map +1 -0
- package/dist/core/processor/readers/EmailReader.js +259 -0
- package/dist/core/processor/readers/EmailReader.js.map +1 -0
- package/dist/core/processor/readers/EpubReader.js +175 -0
- package/dist/core/processor/readers/EpubReader.js.map +1 -0
- package/dist/core/processor/readers/FileReader.js +90 -0
- package/dist/core/processor/readers/FileReader.js.map +1 -0
- package/dist/core/processor/readers/FileReaderFactory.js +49 -0
- package/dist/core/processor/readers/FileReaderFactory.js.map +1 -0
- package/dist/core/processor/readers/HtmlReader.js +371 -0
- package/dist/core/processor/readers/HtmlReader.js.map +1 -0
- package/dist/core/processor/readers/ImageReader.js +162 -0
- package/dist/core/processor/readers/ImageReader.js.map +1 -0
- package/dist/core/processor/readers/JsonFileReader.js +232 -0
- package/dist/core/processor/readers/JsonFileReader.js.map +1 -0
- package/dist/core/processor/readers/JupyterReader.js +178 -0
- package/dist/core/processor/readers/JupyterReader.js.map +1 -0
- package/dist/core/processor/readers/LatexReader.js +176 -0
- package/dist/core/processor/readers/LatexReader.js.map +1 -0
- package/dist/core/processor/readers/MarkdownReader.js +289 -0
- package/dist/core/processor/readers/MarkdownReader.js.map +1 -0
- package/dist/core/processor/readers/MarkerPdfReader.js +193 -0
- package/dist/core/processor/readers/MarkerPdfReader.js.map +1 -0
- package/dist/core/processor/readers/MistralOcrReader.js +198 -0
- package/dist/core/processor/readers/MistralOcrReader.js.map +1 -0
- package/dist/core/processor/readers/OfficeReader.js +174 -0
- package/dist/core/processor/readers/OfficeReader.js.map +1 -0
- package/dist/core/processor/readers/PdfReader.js +116 -0
- package/dist/core/processor/readers/PdfReader.js.map +1 -0
- package/dist/core/processor/readers/RtfReader.js +107 -0
- package/dist/core/processor/readers/RtfReader.js.map +1 -0
- package/dist/core/processor/readers/SubtitleReader.js +145 -0
- package/dist/core/processor/readers/SubtitleReader.js.map +1 -0
- package/dist/core/processor/readers/TesseractPdfReader.js +183 -0
- package/dist/core/processor/readers/TesseractPdfReader.js.map +1 -0
- package/dist/core/processor/readers/TextReader.js +129 -0
- package/dist/core/processor/readers/TextReader.js.map +1 -0
- package/dist/core/processor/readers/TranscriptReader.js +234 -0
- package/dist/core/processor/readers/TranscriptReader.js.map +1 -0
- package/dist/core/processor/readers/image/imageMetadata.js +155 -0
- package/dist/core/processor/readers/image/imageMetadata.js.map +1 -0
- package/dist/core/processor/readers/index.js +41 -0
- package/dist/core/processor/readers/index.js.map +1 -0
- package/dist/core/processor/readers/referenceExtraction.js +198 -0
- package/dist/core/processor/readers/referenceExtraction.js.map +1 -0
- package/dist/core/processor/readers/stripReferences.js +59 -0
- package/dist/core/processor/readers/stripReferences.js.map +1 -0
- package/dist/core/processor/readers/transcript/turnPacking.js +81 -0
- package/dist/core/processor/readers/transcript/turnPacking.js.map +1 -0
- package/dist/core/progress/NdjsonProgressEmitter.js +30 -0
- package/dist/core/progress/NdjsonProgressEmitter.js.map +1 -0
- package/dist/core/progress/NoopProgressEmitter.js +15 -0
- package/dist/core/progress/NoopProgressEmitter.js.map +1 -0
- package/dist/core/progress/index.js +19 -0
- package/dist/core/progress/index.js.map +1 -0
- package/dist/core/trace/TraceWriter.js +100 -0
- package/dist/core/trace/TraceWriter.js.map +1 -0
- package/dist/core/trace/events.js +13 -0
- package/dist/core/trace/events.js.map +1 -0
- package/dist/core/trace/index.js +20 -0
- package/dist/core/trace/index.js.map +1 -0
- package/dist/core/trace/lineage.js +97 -0
- package/dist/core/trace/lineage.js.map +1 -0
- package/dist/evaluation/BenchmarkRunner.js +171 -0
- package/dist/evaluation/BenchmarkRunner.js.map +1 -0
- package/dist/evaluation/classifier/ClassifierAccuracy.js +185 -0
- package/dist/evaluation/classifier/ClassifierAccuracy.js.map +1 -0
- package/dist/evaluation/classifier/labeledSamples.js +379 -0
- package/dist/evaluation/classifier/labeledSamples.js.map +1 -0
- package/dist/evaluation/compare/goldCompare.js +126 -0
- package/dist/evaluation/compare/goldCompare.js.map +1 -0
- package/dist/evaluation/crossre/compareScoring.js +30 -0
- package/dist/evaluation/crossre/compareScoring.js.map +1 -0
- package/dist/evaluation/datasets/CrossREDataset.js +170 -0
- package/dist/evaluation/datasets/CrossREDataset.js.map +1 -0
- package/dist/evaluation/datasets/IDataset.js +3 -0
- package/dist/evaluation/datasets/IDataset.js.map +1 -0
- package/dist/evaluation/datasets/RebelDataset.js +117 -0
- package/dist/evaluation/datasets/RebelDataset.js.map +1 -0
- package/dist/evaluation/datasets/RedocredDataset.js +218 -0
- package/dist/evaluation/datasets/RedocredDataset.js.map +1 -0
- package/dist/evaluation/datasets/SemEval2010Dataset.js +150 -0
- package/dist/evaluation/datasets/SemEval2010Dataset.js.map +1 -0
- package/dist/evaluation/index.js +33 -0
- package/dist/evaluation/index.js.map +1 -0
- package/dist/evaluation/matching/ExactMatcher.js +75 -0
- package/dist/evaluation/matching/ExactMatcher.js.map +1 -0
- package/dist/evaluation/matching/SemanticMatcher.js +143 -0
- package/dist/evaluation/matching/SemanticMatcher.js.map +1 -0
- package/dist/evaluation/metrics/TripleMetrics.js +64 -0
- package/dist/evaluation/metrics/TripleMetrics.js.map +1 -0
- package/dist/evaluation/mine/MineCheckpoint.js +114 -0
- package/dist/evaluation/mine/MineCheckpoint.js.map +1 -0
- package/dist/evaluation/mine/MineDataset.js +208 -0
- package/dist/evaluation/mine/MineDataset.js.map +1 -0
- package/dist/evaluation/mine/MineReporter.js +98 -0
- package/dist/evaluation/mine/MineReporter.js.map +1 -0
- package/dist/evaluation/mine/MineRunner.js +148 -0
- package/dist/evaluation/mine/MineRunner.js.map +1 -0
- package/dist/evaluation/mine/MineScorer.js +127 -0
- package/dist/evaluation/mine/MineScorer.js.map +1 -0
- package/dist/evaluation/mine/types.js +12 -0
- package/dist/evaluation/mine/types.js.map +1 -0
- package/dist/evaluation/reporters/ConsoleReporter.js +55 -0
- package/dist/evaluation/reporters/ConsoleReporter.js.map +1 -0
- package/dist/evaluation/reporters/JsonReporter.js +50 -0
- package/dist/evaluation/reporters/JsonReporter.js.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/quality/CompositeScore.js +61 -0
- package/dist/quality/CompositeScore.js.map +1 -0
- package/dist/quality/ConsistencyMetrics.js +70 -0
- package/dist/quality/ConsistencyMetrics.js.map +1 -0
- package/dist/quality/FactualMetrics.js +76 -0
- package/dist/quality/FactualMetrics.js.map +1 -0
- package/dist/quality/GraphHealthMetrics.js +68 -0
- package/dist/quality/GraphHealthMetrics.js.map +1 -0
- package/dist/quality/SemanticMetrics.js +102 -0
- package/dist/quality/SemanticMetrics.js.map +1 -0
- package/dist/quality/StructuralMetrics.js +60 -0
- package/dist/quality/StructuralMetrics.js.map +1 -0
- package/dist/quality/index.js +23 -0
- package/dist/quality/index.js.map +1 -0
- package/dist/shared/index.js +20 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/logger/Logger.js +3 -0
- package/dist/shared/logger/Logger.js.map +1 -0
- package/dist/shared/logger/LoggerFactory.js +75 -0
- package/dist/shared/logger/LoggerFactory.js.map +1 -0
- package/dist/shared/logger/index.js +19 -0
- package/dist/shared/logger/index.js.map +1 -0
- package/dist/shared/shutdown.js +30 -0
- package/dist/shared/shutdown.js.map +1 -0
- package/dist/shared/utils/agglomerativeCluster.js +269 -0
- package/dist/shared/utils/agglomerativeCluster.js.map +1 -0
- package/dist/shared/utils/astSymbols.js +69 -0
- package/dist/shared/utils/astSymbols.js.map +1 -0
- package/dist/shared/utils/cosineSimilarity.js +18 -0
- package/dist/shared/utils/cosineSimilarity.js.map +1 -0
- package/dist/shared/utils/directoryTree.js +184 -0
- package/dist/shared/utils/directoryTree.js.map +1 -0
- package/dist/shared/utils/documentOutline.js +74 -0
- package/dist/shared/utils/documentOutline.js.map +1 -0
- package/dist/shared/utils/index.js +24 -0
- package/dist/shared/utils/index.js.map +1 -0
- package/dist/shared/utils/jaroWinklerSimilarity.js +60 -0
- package/dist/shared/utils/jaroWinklerSimilarity.js.map +1 -0
- package/dist/shared/utils/parseJsonLenient.js +27 -0
- package/dist/shared/utils/parseJsonLenient.js.map +1 -0
- package/dist/shared/utils/readConfig.js +42 -0
- package/dist/shared/utils/readConfig.js.map +1 -0
- package/dist/shared/utils/readRtf.js +216 -0
- package/dist/shared/utils/readRtf.js.map +1 -0
- package/dist/shared/utils/softmax.js +26 -0
- package/dist/shared/utils/softmax.js.map +1 -0
- package/dist/types/ContentClass.js +3 -0
- package/dist/types/ContentClass.js.map +1 -0
- package/dist/types/CorpusProfile.js +3 -0
- package/dist/types/CorpusProfile.js.map +1 -0
- package/dist/types/IContradictionChecker.js +3 -0
- package/dist/types/IContradictionChecker.js.map +1 -0
- package/dist/types/ICorpusAnalyzer.js +3 -0
- package/dist/types/ICorpusAnalyzer.js.map +1 -0
- package/dist/types/IDirectoryProcessor.js +3 -0
- package/dist/types/IDirectoryProcessor.js.map +1 -0
- package/dist/types/IEmbeddingProvider.js +3 -0
- package/dist/types/IEmbeddingProvider.js.map +1 -0
- package/dist/types/IEmbeddingService.js +6 -0
- package/dist/types/IEmbeddingService.js.map +1 -0
- package/dist/types/IFileProcessor.js +3 -0
- package/dist/types/IFileProcessor.js.map +1 -0
- package/dist/types/IGroundingChecker.js +3 -0
- package/dist/types/IGroundingChecker.js.map +1 -0
- package/dist/types/IKnowledgeGraphBuilder.js +3 -0
- package/dist/types/IKnowledgeGraphBuilder.js.map +1 -0
- package/dist/types/IKnowledgeGraphExporter.js +3 -0
- package/dist/types/IKnowledgeGraphExporter.js.map +1 -0
- package/dist/types/IKnowledgeGraphMerger.js +3 -0
- package/dist/types/IKnowledgeGraphMerger.js.map +1 -0
- package/dist/types/IKnowledgeGraphSearch.js +3 -0
- package/dist/types/IKnowledgeGraphSearch.js.map +1 -0
- package/dist/types/ILLMProvider.js +3 -0
- package/dist/types/ILLMProvider.js.map +1 -0
- package/dist/types/ILLMService.js +3 -0
- package/dist/types/ILLMService.js.map +1 -0
- package/dist/types/IObjectDetector.js +3 -0
- package/dist/types/IObjectDetector.js.map +1 -0
- package/dist/types/IProcessingService.js +3 -0
- package/dist/types/IProcessingService.js.map +1 -0
- package/dist/types/IProgressEmitter.js +3 -0
- package/dist/types/IProgressEmitter.js.map +1 -0
- package/dist/types/IPromptManager.js +3 -0
- package/dist/types/IPromptManager.js.map +1 -0
- package/dist/types/KnowledgeGraph.js +3 -0
- package/dist/types/KnowledgeGraph.js.map +1 -0
- package/dist/types/MCPKnowledgeGraph.js +3 -0
- package/dist/types/MCPKnowledgeGraph.js.map +1 -0
- package/dist/types/Observation.js +21 -0
- package/dist/types/Observation.js.map +1 -0
- package/dist/types/ProcessingOptions.js +3 -0
- package/dist/types/ProcessingOptions.js.map +1 -0
- package/dist/types/index.js +40 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +122 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
### Example 1: Paper introduction (proposed method + hypothesis)
|
|
2
|
+
|
|
3
|
+
Input:
|
|
4
|
+
|
|
5
|
+
## File information
|
|
6
|
+
|
|
7
|
+
Path: `papers/blocksparse-attention.md`
|
|
8
|
+
|
|
9
|
+
## Content to analyze
|
|
10
|
+
```
|
|
11
|
+
# Efficient Sparse Attention for Long-Context Transformers
|
|
12
|
+
Authors: A. Rivera, L. Chen — Stanford NLP Lab
|
|
13
|
+
|
|
14
|
+
We propose BlockSparse, a sparse-attention mechanism that lowers attention memory
|
|
15
|
+
from O(n^2) to O(n log n). We hypothesize that most attention mass is local, so a
|
|
16
|
+
windowed pattern loses little accuracy. On the PG-19 benchmark, BlockSparse cuts
|
|
17
|
+
perplexity from 33.2 to 31.8 versus a dense baseline. The design builds on the
|
|
18
|
+
Longformer windowed-attention approach (Beltagy et al., 2020).
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Output:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"entities": [
|
|
26
|
+
{
|
|
27
|
+
"name": "BlockSparse",
|
|
28
|
+
"entityType": "methodology",
|
|
29
|
+
"observations": [
|
|
30
|
+
"Sparse-attention mechanism for long-context transformers",
|
|
31
|
+
"Lowers attention memory from O(n^2) to O(n log n)",
|
|
32
|
+
"Cuts PG-19 perplexity from 33.2 to 31.8 versus a dense baseline"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "locality of attention",
|
|
37
|
+
"entityType": "hypothesis",
|
|
38
|
+
"observations": ["Most attention mass is local, so a windowed pattern loses little accuracy"]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "A. Rivera",
|
|
42
|
+
"entityType": "researcher",
|
|
43
|
+
"observations": ["Co-author of the BlockSparse paper"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "Stanford NLP Lab",
|
|
47
|
+
"entityType": "institution",
|
|
48
|
+
"observations": ["Affiliation of the BlockSparse authors"]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "PG-19",
|
|
52
|
+
"entityType": "dataset",
|
|
53
|
+
"observations": ["Long-document language-modeling benchmark used for evaluation"]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Longformer",
|
|
57
|
+
"entityType": "methodology",
|
|
58
|
+
"observations": ["Windowed-attention approach of Beltagy et al., 2020"]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"relations": [
|
|
62
|
+
{ "from": "BlockSparse", "to": "locality of attention", "relationType": ["tests"] },
|
|
63
|
+
{ "from": "BlockSparse", "to": "PG-19", "relationType": ["uses"] },
|
|
64
|
+
{ "from": "BlockSparse", "to": "Longformer", "relationType": ["builds_upon"] },
|
|
65
|
+
{ "from": "A. Rivera", "to": "BlockSparse", "relationType": ["produces"] },
|
|
66
|
+
{ "from": "A. Rivera", "to": "Stanford NLP Lab", "relationType": ["member_of"] }
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Note: the perplexity figures (33.2 → 31.8) and the `O(...)` bounds are measured
|
|
72
|
+
values — observations on the method, not their own nodes. `methodology` is reused
|
|
73
|
+
for both the proposed method and the prior one it builds on; the type set stays small.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Example 2: Experiment + statistical result (with prior context — extend, don't duplicate)
|
|
78
|
+
|
|
79
|
+
Input:
|
|
80
|
+
|
|
81
|
+
## File information
|
|
82
|
+
|
|
83
|
+
Path: `papers/blocksparse-attention.md`
|
|
84
|
+
Chunk 4 of 7
|
|
85
|
+
|
|
86
|
+
## Already extracted (do not re-emit)
|
|
87
|
+
|
|
88
|
+
- **BlockSparse** (methodology): Sparse-attention mechanism for long-context transformers
|
|
89
|
+
- **PG-19** (dataset): Long-document language-modeling benchmark used for evaluation
|
|
90
|
+
|
|
91
|
+
## Content to analyze
|
|
92
|
+
```
|
|
93
|
+
We ran an ablation across 4 random seeds comparing BlockSparse against the dense
|
|
94
|
+
baseline. The perplexity reduction was significant (paired t-test, p < 0.01).
|
|
95
|
+
Throughput, measured in tokens/second, rose 2.3x at 16k context length.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Output:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"entities": [
|
|
103
|
+
{
|
|
104
|
+
"name": "BlockSparse ablation",
|
|
105
|
+
"entityType": "experiment",
|
|
106
|
+
"observations": [
|
|
107
|
+
"Ablation across 4 random seeds against the dense baseline",
|
|
108
|
+
"Throughput rose 2.3x at 16k context length"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "paired t-test",
|
|
113
|
+
"entityType": "statistical_test",
|
|
114
|
+
"observations": ["Perplexity reduction significant at p < 0.01"]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "throughput",
|
|
118
|
+
"entityType": "variable",
|
|
119
|
+
"observations": ["Measured in tokens/second"]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"relations": [
|
|
123
|
+
{ "from": "BlockSparse ablation", "to": "BlockSparse", "relationType": ["validates"] },
|
|
124
|
+
{ "from": "BlockSparse ablation", "to": "throughput", "relationType": ["measures"] },
|
|
125
|
+
{ "from": "BlockSparse ablation", "to": "paired t-test", "relationType": ["uses"] }
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Note: `p < 0.01`, `4 seeds`, and `2.3x` are observations, not nodes. `BlockSparse`
|
|
131
|
+
is referenced by its exact prior name in a relation without being re-emitted (it
|
|
132
|
+
gained no new fact here). One predicate per edge — no `["validates", "tests"]`.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Example 3: Related work (citations + a contradicted finding)
|
|
137
|
+
|
|
138
|
+
Input:
|
|
139
|
+
|
|
140
|
+
## File information
|
|
141
|
+
|
|
142
|
+
Path: `papers/blocksparse-attention.md`
|
|
143
|
+
Chunk 6 of 7
|
|
144
|
+
|
|
145
|
+
## Already extracted (do not re-emit)
|
|
146
|
+
|
|
147
|
+
- **BlockSparse** (methodology): Sparse-attention mechanism for long-context transformers
|
|
148
|
+
|
|
149
|
+
## Content to analyze
|
|
150
|
+
```
|
|
151
|
+
## Related Work
|
|
152
|
+
Child et al. (2019) introduced fixed sparse-attention patterns. Smith et al. (2021)
|
|
153
|
+
reported that sparsity yields no perplexity gain at scale — a claim our PG-19
|
|
154
|
+
results contradict.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Output:
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"entities": [
|
|
162
|
+
{
|
|
163
|
+
"name": "Sparse Transformer (Child et al., 2019)",
|
|
164
|
+
"entityType": "publication",
|
|
165
|
+
"observations": ["Introduced fixed sparse-attention patterns"]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "Smith et al. (2021)",
|
|
169
|
+
"entityType": "publication",
|
|
170
|
+
"observations": ["Reported that sparsity yields no perplexity gain at scale"]
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"relations": [
|
|
174
|
+
{ "from": "BlockSparse", "to": "Sparse Transformer (Child et al., 2019)", "relationType": ["cites"] },
|
|
175
|
+
{ "from": "BlockSparse", "to": "Smith et al. (2021)", "relationType": ["contradicts"] }
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Note: a cited prior work is a `publication`; `cites` records the reference, while
|
|
181
|
+
`contradicts` records the disagreement in findings — two distinct predicates, never
|
|
182
|
+
stacked. Direction is consistent (citing work → cited work).
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### Example 4: Pure notation → empty graph
|
|
187
|
+
|
|
188
|
+
Input:
|
|
189
|
+
|
|
190
|
+
## File information
|
|
191
|
+
|
|
192
|
+
Path: `papers/blocksparse-attention.md`
|
|
193
|
+
Chunk 7 of 7
|
|
194
|
+
|
|
195
|
+
## Content to analyze
|
|
196
|
+
```
|
|
197
|
+
$$ \mathcal{L}(\theta) = -\sum_{i=1}^{N} \log p_\theta(x_i) + \lambda \lVert \theta \rVert_2^2 $$
|
|
198
|
+
where $\theta \in \mathbb{R}^d$ and $\lambda > 0$.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Output:
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{ "entities": [], "relations": [] }
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Note: an isolated equation with no named concept to attach it to yields nothing —
|
|
208
|
+
bare symbols and formulas are observations at most, never nodes.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
### Example 1
|
|
2
|
+
|
|
3
|
+
Input:
|
|
4
|
+
|
|
5
|
+
## File Information
|
|
6
|
+
|
|
7
|
+
Path: `data/inventory/products_2024q1.csv`
|
|
8
|
+
|
|
9
|
+
## Content to Analyze
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
SKU,Name,Category,Price,Stock,Supplier
|
|
13
|
+
PRD-001,USB-C Hub 7-Port,Accessories,49.99,312,TechSource Inc
|
|
14
|
+
PRD-002,Mechanical Keyboard TKL,Peripherals,129.99,87,KeyCraft
|
|
15
|
+
PRD-003,27in 4K Monitor,Displays,399.99,44,ViewMax
|
|
16
|
+
PRD-004,Laptop Stand Aluminum,Accessories,39.99,201,TechSource Inc
|
|
17
|
+
PRD-005,Wireless Mouse Ergonomic,Peripherals,69.99,156,KeyCraft
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Output:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"entities": [
|
|
25
|
+
{
|
|
26
|
+
"name": "products_2024q1",
|
|
27
|
+
"entityType": "table",
|
|
28
|
+
"observations": [
|
|
29
|
+
"Inventory snapshot for Q1 2024",
|
|
30
|
+
"6 columns: SKU, Name, Category, Price, Stock, Supplier",
|
|
31
|
+
"5 product rows across 3 categories"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Accessories",
|
|
36
|
+
"entityType": "category",
|
|
37
|
+
"observations": [
|
|
38
|
+
"Contains PRD-001 (USB-C Hub) and PRD-004 (Laptop Stand)",
|
|
39
|
+
"Both products supplied by TechSource Inc",
|
|
40
|
+
"Price range: $39.99–$49.99"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "Peripherals",
|
|
45
|
+
"entityType": "category",
|
|
46
|
+
"observations": [
|
|
47
|
+
"Contains PRD-002 (Mechanical Keyboard) and PRD-005 (Wireless Mouse)",
|
|
48
|
+
"Both products supplied by KeyCraft",
|
|
49
|
+
"Price range: $69.99–$129.99"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "Displays",
|
|
54
|
+
"entityType": "category",
|
|
55
|
+
"observations": [
|
|
56
|
+
"Contains PRD-003 (27in 4K Monitor)",
|
|
57
|
+
"Highest unit price at $399.99",
|
|
58
|
+
"Lowest stock level at 44 units"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "TechSource Inc",
|
|
63
|
+
"entityType": "supplier",
|
|
64
|
+
"observations": ["Supplies all Accessories category products"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "KeyCraft",
|
|
68
|
+
"entityType": "supplier",
|
|
69
|
+
"observations": ["Supplies all Peripherals category products"]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "ViewMax",
|
|
73
|
+
"entityType": "supplier",
|
|
74
|
+
"observations": ["Sole supplier of Displays category"]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"relations": [
|
|
78
|
+
{ "from": "products_2024q1", "to": "Accessories", "relationType": ["contains"] },
|
|
79
|
+
{ "from": "products_2024q1", "to": "Peripherals", "relationType": ["contains"] },
|
|
80
|
+
{ "from": "products_2024q1", "to": "Displays", "relationType": ["contains"] },
|
|
81
|
+
{ "from": "TechSource Inc", "to": "Accessories", "relationType": ["supplies"] },
|
|
82
|
+
{ "from": "KeyCraft", "to": "Peripherals", "relationType": ["supplies"] },
|
|
83
|
+
{ "from": "ViewMax", "to": "Displays", "relationType": ["supplies"] }
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Example 2
|
|
91
|
+
|
|
92
|
+
Input:
|
|
93
|
+
|
|
94
|
+
## File Information
|
|
95
|
+
|
|
96
|
+
Path: `db/schema/orders.sql`
|
|
97
|
+
|
|
98
|
+
## Content to Analyze
|
|
99
|
+
|
|
100
|
+
```sql
|
|
101
|
+
CREATE TABLE customers (
|
|
102
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
103
|
+
email TEXT NOT NULL UNIQUE,
|
|
104
|
+
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
CREATE TABLE products (
|
|
108
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
109
|
+
sku TEXT NOT NULL UNIQUE,
|
|
110
|
+
name TEXT NOT NULL,
|
|
111
|
+
price_cents INTEGER NOT NULL CHECK (price_cents > 0)
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
CREATE TABLE orders (
|
|
115
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
116
|
+
customer_id UUID NOT NULL REFERENCES customers(id) ON DELETE CASCADE,
|
|
117
|
+
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
118
|
+
status TEXT NOT NULL DEFAULT 'pending'
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
CREATE TABLE order_items (
|
|
122
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
123
|
+
order_id UUID NOT NULL REFERENCES orders(id) ON DELETE CASCADE,
|
|
124
|
+
product_id UUID NOT NULL REFERENCES products(id),
|
|
125
|
+
quantity INTEGER NOT NULL CHECK (quantity > 0),
|
|
126
|
+
unit_price_cents INTEGER NOT NULL
|
|
127
|
+
);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Output:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"entities": [
|
|
135
|
+
{
|
|
136
|
+
"name": "customers",
|
|
137
|
+
"entityType": "table",
|
|
138
|
+
"observations": [
|
|
139
|
+
"Primary key: UUID with gen_random_uuid() default",
|
|
140
|
+
"email must be unique and not null",
|
|
141
|
+
"Soft-delete cascade propagates to orders"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "products",
|
|
146
|
+
"entityType": "table",
|
|
147
|
+
"observations": [
|
|
148
|
+
"SKU is unique identifier alongside UUID primary key",
|
|
149
|
+
"price_cents enforces positive integer constraint",
|
|
150
|
+
"No cascade delete — orphan order_items are prevented by FK"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "orders",
|
|
155
|
+
"entityType": "table",
|
|
156
|
+
"observations": [
|
|
157
|
+
"Links to customers via customer_id foreign key",
|
|
158
|
+
"Default status is 'pending'",
|
|
159
|
+
"Cascade deletes propagate to order_items"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "order_items",
|
|
164
|
+
"entityType": "table",
|
|
165
|
+
"observations": [
|
|
166
|
+
"Junction table between orders and products",
|
|
167
|
+
"Stores unit_price_cents at time of purchase (denormalized for history)",
|
|
168
|
+
"quantity must be positive"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"relations": [
|
|
173
|
+
{ "from": "orders", "to": "customers", "relationType": ["foreign_key_to"] },
|
|
174
|
+
{ "from": "order_items", "to": "orders", "relationType": ["foreign_key_to"] },
|
|
175
|
+
{ "from": "order_items", "to": "products", "relationType": ["foreign_key_to"] }
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
```
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
### Example 1
|
|
2
|
+
|
|
3
|
+
Input:
|
|
4
|
+
|
|
5
|
+
## File Information
|
|
6
|
+
|
|
7
|
+
Path: `meetings/2024-03-15-sprint-retro.txt`
|
|
8
|
+
|
|
9
|
+
## Content to Analyze
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Sprint 12 Retrospective — 2024-03-15
|
|
13
|
+
Attendees: Sarah Chen (EM), David Park (Backend), Aisha Osei (Frontend), Tom Rivera (QA)
|
|
14
|
+
Facilitator: Sarah Chen
|
|
15
|
+
|
|
16
|
+
WHAT WENT WELL
|
|
17
|
+
- CI pipeline improvements cut build time by 40%
|
|
18
|
+
- New feature flags system shipped on time
|
|
19
|
+
|
|
20
|
+
WHAT NEEDS IMPROVEMENT
|
|
21
|
+
- API contract changes broke the mobile app twice (no shared schema validation)
|
|
22
|
+
- QA was pulled in too late; several bugs caught post-deploy
|
|
23
|
+
|
|
24
|
+
DECISIONS
|
|
25
|
+
1. All API changes must include an OpenAPI diff reviewed by QA before merging.
|
|
26
|
+
2. QA joins sprint planning from Sprint 13 onward.
|
|
27
|
+
|
|
28
|
+
ACTION ITEMS
|
|
29
|
+
- David Park: Add openapi-diff step to GitHub Actions by 2024-03-22
|
|
30
|
+
- Aisha Osei: Integrate shared schema package into frontend build by 2024-03-29
|
|
31
|
+
- Sarah Chen: Update Definition of Done to include schema review gate
|
|
32
|
+
- Tom Rivera: Create QA onboarding template for sprint planning by 2024-03-20
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Output:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"entities": [
|
|
40
|
+
{
|
|
41
|
+
"name": "Sprint 12 Retrospective",
|
|
42
|
+
"entityType": "meeting",
|
|
43
|
+
"observations": [
|
|
44
|
+
"Held on 2024-03-15",
|
|
45
|
+
"Facilitated by Sarah Chen",
|
|
46
|
+
"Focus: process improvements after two API breakages"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "Sarah Chen",
|
|
51
|
+
"entityType": "person",
|
|
52
|
+
"observations": ["Engineering Manager", "Facilitator for the retro", "Owns Definition of Done update"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "David Park",
|
|
56
|
+
"entityType": "person",
|
|
57
|
+
"observations": ["Backend engineer", "Responsible for OpenAPI diff CI step"]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "Aisha Osei",
|
|
61
|
+
"entityType": "person",
|
|
62
|
+
"observations": ["Frontend engineer", "Owns shared schema integration into frontend build"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "Tom Rivera",
|
|
66
|
+
"entityType": "person",
|
|
67
|
+
"observations": ["QA engineer", "Tasked with creating QA sprint planning onboarding template"]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "Add openapi-diff to GitHub Actions",
|
|
71
|
+
"entityType": "action_item",
|
|
72
|
+
"observations": ["Due 2024-03-22", "Prevents unreviewed API contract changes from merging"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "Integrate shared schema into frontend",
|
|
76
|
+
"entityType": "action_item",
|
|
77
|
+
"observations": ["Due 2024-03-29", "Assigned to Aisha Osei"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "QA joins sprint planning",
|
|
81
|
+
"entityType": "decision",
|
|
82
|
+
"observations": ["Effective from Sprint 13", "Addresses late QA involvement causing post-deploy bugs"]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"relations": [
|
|
86
|
+
{ "from": "Sarah Chen", "to": "Sprint 12 Retrospective", "relationType": ["facilitates"] },
|
|
87
|
+
{ "from": "David Park", "to": "Sprint 12 Retrospective", "relationType": ["attends"] },
|
|
88
|
+
{ "from": "Aisha Osei", "to": "Sprint 12 Retrospective", "relationType": ["attends"] },
|
|
89
|
+
{ "from": "Tom Rivera", "to": "Sprint 12 Retrospective", "relationType": ["attends"] },
|
|
90
|
+
{ "from": "David Park", "to": "Add openapi-diff to GitHub Actions","relationType": ["responsible_for"] },
|
|
91
|
+
{ "from": "Aisha Osei", "to": "Integrate shared schema into frontend", "relationType": ["responsible_for"] },
|
|
92
|
+
{ "from": "Sprint 12 Retrospective", "to": "QA joins sprint planning", "relationType": ["decides"] }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Example 2
|
|
100
|
+
|
|
101
|
+
Input:
|
|
102
|
+
|
|
103
|
+
## File Information
|
|
104
|
+
|
|
105
|
+
Path: `interviews/user-research-2024-04-02.txt`
|
|
106
|
+
|
|
107
|
+
## Content to Analyze
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Customer Discovery Interview — 2024-04-02
|
|
111
|
+
Interviewer: Maya Patel (Product)
|
|
112
|
+
Interviewee: Jordan Lee, CTO at Stackwise (B2B SaaS, 80 employees)
|
|
113
|
+
|
|
114
|
+
MAYA: How does your team currently handle on-call escalation?
|
|
115
|
+
|
|
116
|
+
JORDAN: We use PagerDuty, but the runbooks live in Confluence. When an alert fires at 2 AM,
|
|
117
|
+
engineers have to context-switch between three tools to figure out what to do. It's painful.
|
|
118
|
+
|
|
119
|
+
MAYA: What would make that better?
|
|
120
|
+
|
|
121
|
+
JORDAN: Honestly, if the runbook context surfaced automatically inside the alert — even
|
|
122
|
+
just the last five incidents for that service — that would cut mean time to resolve by half.
|
|
123
|
+
|
|
124
|
+
MAYA: Have you tried any integrations?
|
|
125
|
+
|
|
126
|
+
JORDAN: We built a custom Slack bot that pulls Confluence pages, but it broke twice in
|
|
127
|
+
six months when Confluence changed their API. Maintenance is a nightmare.
|
|
128
|
+
|
|
129
|
+
PAIN POINTS SUMMARY
|
|
130
|
+
- Context fragmentation across PagerDuty, Confluence, Slack
|
|
131
|
+
- Runbook discoverability during incidents
|
|
132
|
+
- Brittle custom integrations
|
|
133
|
+
|
|
134
|
+
FEATURE REQUESTS
|
|
135
|
+
- Automatic runbook surfacing in alerts
|
|
136
|
+
- Recent incident history per service shown inline
|
|
137
|
+
- Stable API / webhook support to avoid custom bot maintenance
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Output:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"entities": [
|
|
145
|
+
{
|
|
146
|
+
"name": "Jordan Lee",
|
|
147
|
+
"entityType": "person",
|
|
148
|
+
"observations": [
|
|
149
|
+
"CTO at Stackwise",
|
|
150
|
+
"Manages on-call engineering team",
|
|
151
|
+
"Built a custom Slack bot for runbook retrieval"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "Maya Patel",
|
|
156
|
+
"entityType": "person",
|
|
157
|
+
"observations": ["Product manager", "Conducting customer discovery interview"]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "Stackwise",
|
|
161
|
+
"entityType": "organization",
|
|
162
|
+
"observations": ["B2B SaaS company", "~80 employees"]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "Context fragmentation across tools",
|
|
166
|
+
"entityType": "pain_point",
|
|
167
|
+
"observations": [
|
|
168
|
+
"Engineers must switch between PagerDuty, Confluence, and Slack during incidents",
|
|
169
|
+
"Particularly painful during 2 AM on-call alerts"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "Brittle custom Slack bot",
|
|
174
|
+
"entityType": "pain_point",
|
|
175
|
+
"observations": [
|
|
176
|
+
"Breaks when Confluence changes their API",
|
|
177
|
+
"Failed twice in six months",
|
|
178
|
+
"High maintenance burden"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "Automatic runbook surfacing in alerts",
|
|
183
|
+
"entityType": "feature_request",
|
|
184
|
+
"observations": [
|
|
185
|
+
"Show runbook content inline within alert notifications",
|
|
186
|
+
"Expected to cut MTTR by ~50% per Jordan Lee"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "Recent incident history per service",
|
|
191
|
+
"entityType": "feature_request",
|
|
192
|
+
"observations": ["Last 5 incidents for the affected service shown inline in alert"]
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"relations": [
|
|
196
|
+
{ "from": "Jordan Lee", "to": "Stackwise", "relationType": ["works_at"] },
|
|
197
|
+
{ "from": "Maya Patel", "to": "Jordan Lee", "relationType": ["interviews"] },
|
|
198
|
+
{ "from": "Jordan Lee", "to": "Context fragmentation across tools", "relationType": ["reports"] },
|
|
199
|
+
{ "from": "Jordan Lee", "to": "Brittle custom Slack bot", "relationType": ["reports"] },
|
|
200
|
+
{ "from": "Jordan Lee", "to": "Automatic runbook surfacing in alerts", "relationType": ["requests"] },
|
|
201
|
+
{ "from": "Jordan Lee", "to": "Recent incident history per service", "relationType": ["requests"] }
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{{#if retrievedEntities}}
|
|
2
|
+
## Related Context
|
|
3
|
+
|
|
4
|
+
The following entities were found in previously processed files that may be relevant:
|
|
5
|
+
|
|
6
|
+
{{#each retrievedEntities}}
|
|
7
|
+
### {{name}}
|
|
8
|
+
- **Type**: {{entityType}}
|
|
9
|
+
- **File**: {{file}}
|
|
10
|
+
{{#if observations}}
|
|
11
|
+
- **Key Facts**:
|
|
12
|
+
{{#each observations}}
|
|
13
|
+
- {{this}}
|
|
14
|
+
{{/each}}
|
|
15
|
+
{{/if}}
|
|
16
|
+
|
|
17
|
+
{{/each}}
|
|
18
|
+
{{/if}}
|