@thanh01.pmt/research-kit 1.0.0 → 1.1.1
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 +213 -0
- package/dist/academic/index.cjs +332 -127
- package/dist/academic/index.cjs.map +1 -1
- package/dist/academic/index.d.cts +3 -3
- package/dist/academic/index.d.ts +3 -3
- package/dist/academic/index.js +2 -2
- package/dist/{catalogBuilder-8A-Dg_A-.d.ts → catalogBuilder-CmmQzUnf.d.ts} +11 -3
- package/dist/{catalogBuilder-feU79wQQ.d.cts → catalogBuilder-DgXYxL2F.d.cts} +11 -3
- package/dist/chunk-2JEVBCIF.js +3 -0
- package/dist/{chunk-KGCDYFFD.js.map → chunk-2JEVBCIF.js.map} +1 -1
- package/dist/chunk-2XIEWCUE.js +244 -0
- package/dist/chunk-2XIEWCUE.js.map +1 -0
- package/dist/chunk-AUGVVZTL.js +514 -0
- package/dist/chunk-AUGVVZTL.js.map +1 -0
- package/dist/chunk-DOXSPRSP.js +559 -0
- package/dist/chunk-DOXSPRSP.js.map +1 -0
- package/dist/chunk-GKF3NDEX.js +162 -0
- package/dist/chunk-GKF3NDEX.js.map +1 -0
- package/dist/chunk-J3VCGH7Z.js +3 -0
- package/dist/chunk-J3VCGH7Z.js.map +1 -0
- package/dist/{chunk-67V2GJGK.js → chunk-J7XKDMGL.js} +7 -5
- package/dist/chunk-J7XKDMGL.js.map +1 -0
- package/dist/chunk-KAFQVI2R.js +333 -0
- package/dist/chunk-KAFQVI2R.js.map +1 -0
- package/dist/chunk-XIF5YNI7.js +799 -0
- package/dist/chunk-XIF5YNI7.js.map +1 -0
- package/dist/config/index.cjs +5 -3
- package/dist/config/index.cjs.map +1 -1
- package/dist/config/index.d.cts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +1 -1
- package/dist/evidence/index.cjs +337 -21
- package/dist/evidence/index.cjs.map +1 -1
- package/dist/evidence/index.d.cts +44 -7
- package/dist/evidence/index.d.ts +44 -7
- package/dist/evidence/index.js +3 -2
- package/dist/harvester/index.cjs +805 -64
- package/dist/harvester/index.cjs.map +1 -1
- package/dist/harvester/index.d.cts +79 -8
- package/dist/harvester/index.d.ts +79 -8
- package/dist/harvester/index.js +3 -2
- package/dist/{index-BU5n1ip_.d.ts → index-t8pahlJ4.d.cts} +104 -15
- package/dist/{index-BU5n1ip_.d.cts → index-t8pahlJ4.d.ts} +104 -15
- package/dist/index.cjs +2001 -252
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -8
- package/dist/index.d.ts +156 -8
- package/dist/index.js +237 -8
- package/dist/index.js.map +1 -1
- package/dist/literatureReview-BTPFe7eb.d.cts +64 -0
- package/dist/literatureReview-hGbfrBmw.d.ts +64 -0
- package/dist/pipeline/index.cjs +1570 -241
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.d.cts +49 -9
- package/dist/pipeline/index.d.ts +49 -9
- package/dist/pipeline/index.js +5 -4
- package/dist/webScraper-BhiQ8s9x.d.ts +68 -0
- package/dist/webScraper-D9Ldus9p.d.cts +68 -0
- package/package.json +8 -9
- package/dist/chunk-47L7ZHMY.js +0 -316
- package/dist/chunk-47L7ZHMY.js.map +0 -1
- package/dist/chunk-63X2HPCI.js +0 -47
- package/dist/chunk-63X2HPCI.js.map +0 -1
- package/dist/chunk-67V2GJGK.js.map +0 -1
- package/dist/chunk-6Q2XCUG7.js +0 -40
- package/dist/chunk-6Q2XCUG7.js.map +0 -1
- package/dist/chunk-KGCDYFFD.js +0 -3
- package/dist/chunk-MHAYD555.js +0 -239
- package/dist/chunk-MHAYD555.js.map +0 -1
- package/dist/chunk-MPLDSHFM.js +0 -396
- package/dist/chunk-MPLDSHFM.js.map +0 -1
- package/dist/chunk-QZNLB5X4.js +0 -65
- package/dist/chunk-QZNLB5X4.js.map +0 -1
- package/dist/literatureReview-C4AgVljZ.d.ts +0 -43
- package/dist/literatureReview-Dlods4Aw.d.cts +0 -43
- package/dist/webScraper-pKzdXhfI.d.ts +0 -46
- package/dist/webScraper-yBcYOHoL.d.cts +0 -46
|
@@ -1,45 +1,82 @@
|
|
|
1
|
-
import { S as ScrapedDocument, T as TechnicalDomain } from '../webScraper-
|
|
1
|
+
import { S as ScrapedDocument, T as TechnicalDomain } from '../webScraper-D9Ldus9p.cjs';
|
|
2
|
+
import { L as LlmTextFn, C as CourseResearchContext } from '../index-t8pahlJ4.cjs';
|
|
2
3
|
export { P as ProvenanceRecord, a as ProvenanceSidecar, b as ProvenanceTracker } from '../provenanceTracker-ct4s5lJV.cjs';
|
|
3
|
-
import '../index-BU5n1ip_.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface ScoredEvidence {
|
|
7
7
|
doc: ScrapedDocument;
|
|
8
8
|
score: number;
|
|
9
9
|
isApproved: boolean;
|
|
10
|
+
isLlmEvaluated?: boolean;
|
|
10
11
|
breakdown: {
|
|
11
|
-
technicalDepth
|
|
12
|
+
technicalDepth?: number;
|
|
13
|
+
structuralRichness: number;
|
|
12
14
|
codeSnippetQuality: number;
|
|
13
15
|
noiseFactor: number;
|
|
16
|
+
pedagogicalRelevance?: number;
|
|
14
17
|
};
|
|
15
18
|
summary: string;
|
|
19
|
+
keyTakeaways: string[];
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* Extracts top key sentences from a document ranked by keyword overlap and structural salience (TextRank-inspired).
|
|
23
|
+
*/
|
|
24
|
+
declare function extractTopSentences(markdown: string, targetTopic: string, maxSentences?: number): string[];
|
|
25
|
+
/**
|
|
26
|
+
* Evaluates and scores evidence on a 1-10 scale and extracts real substantive takeaways
|
|
19
27
|
*/
|
|
20
28
|
declare class EvidenceScorer {
|
|
21
29
|
scoreDocument(doc: ScrapedDocument, domain: TechnicalDomain, targetTopic: string): ScoredEvidence;
|
|
30
|
+
/**
|
|
31
|
+
* Evaluates evidence with host LLM for genuine pedagogical relevance, conceptual depth,
|
|
32
|
+
* and accuracy for the target learner age band.
|
|
33
|
+
*/
|
|
34
|
+
scoreDocumentWithLlm(doc: ScrapedDocument, domain: TechnicalDomain, targetTopic: string, options?: {
|
|
35
|
+
llm?: LlmTextFn;
|
|
36
|
+
context?: CourseResearchContext;
|
|
37
|
+
}): Promise<ScoredEvidence>;
|
|
22
38
|
}
|
|
23
39
|
|
|
40
|
+
type ClaimVerdict = 'supported' | 'refuted' | 'not_enough_evidence' | 'lexical_match_only';
|
|
24
41
|
interface VerifiedClaim {
|
|
25
42
|
claimText: string;
|
|
26
43
|
sourceUrl?: string;
|
|
44
|
+
verdict: ClaimVerdict;
|
|
27
45
|
isSupported: boolean;
|
|
46
|
+
isLlmVerified: boolean;
|
|
28
47
|
confidenceScore: number;
|
|
29
48
|
extractedQuote?: string;
|
|
49
|
+
explanation?: string;
|
|
30
50
|
}
|
|
31
51
|
interface ClaimSweepReport {
|
|
32
52
|
totalClaimsChecked: number;
|
|
33
53
|
supportedClaimsCount: number;
|
|
54
|
+
refutedClaimsCount: number;
|
|
55
|
+
unverifiedClaimsCount: number;
|
|
34
56
|
hallucinationRisk: 'low' | 'medium' | 'high';
|
|
57
|
+
isLlmVerified: boolean;
|
|
35
58
|
claims: VerifiedClaim[];
|
|
36
59
|
reportMd: string;
|
|
37
60
|
}
|
|
38
61
|
/**
|
|
39
|
-
* Claim-Support Sweep & Fact Checker
|
|
62
|
+
* Claim-Support Sweep & Fact Checker
|
|
63
|
+
* Combines Deterministic Passage Retrieval (Passage Candidate Slicing)
|
|
64
|
+
* with LLM Semantic Entailment (Natural Language Inference).
|
|
40
65
|
*/
|
|
41
66
|
declare class ClaimVerifier {
|
|
42
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Deterministic lexical match baseline.
|
|
69
|
+
* Explicitly marks verdict as 'lexical_match_only' to prevent false sense of semantic verification.
|
|
70
|
+
*/
|
|
71
|
+
verifyClaimsDeterministic(claims: string[], sourceCorpus: string): ClaimSweepReport;
|
|
72
|
+
/**
|
|
73
|
+
* Primary verification interface.
|
|
74
|
+
* If an LLM callback is provided, performs genuine Semantic Entailment (NLI).
|
|
75
|
+
* Otherwise falls back to deterministic lexical retrieval with honest labeling.
|
|
76
|
+
*/
|
|
77
|
+
verifyClaims(claims: string[], sourceCorpus: string, options?: {
|
|
78
|
+
llm?: LlmTextFn;
|
|
79
|
+
}): Promise<ClaimSweepReport>;
|
|
43
80
|
}
|
|
44
81
|
|
|
45
|
-
export { type ClaimSweepReport, ClaimVerifier, EvidenceScorer, type ScoredEvidence, type VerifiedClaim };
|
|
82
|
+
export { type ClaimSweepReport, type ClaimVerdict, ClaimVerifier, EvidenceScorer, type ScoredEvidence, type VerifiedClaim, extractTopSentences };
|
package/dist/evidence/index.d.ts
CHANGED
|
@@ -1,45 +1,82 @@
|
|
|
1
|
-
import { S as ScrapedDocument, T as TechnicalDomain } from '../webScraper-
|
|
1
|
+
import { S as ScrapedDocument, T as TechnicalDomain } from '../webScraper-BhiQ8s9x.js';
|
|
2
|
+
import { L as LlmTextFn, C as CourseResearchContext } from '../index-t8pahlJ4.js';
|
|
2
3
|
export { P as ProvenanceRecord, a as ProvenanceSidecar, b as ProvenanceTracker } from '../provenanceTracker-ct4s5lJV.js';
|
|
3
|
-
import '../index-BU5n1ip_.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface ScoredEvidence {
|
|
7
7
|
doc: ScrapedDocument;
|
|
8
8
|
score: number;
|
|
9
9
|
isApproved: boolean;
|
|
10
|
+
isLlmEvaluated?: boolean;
|
|
10
11
|
breakdown: {
|
|
11
|
-
technicalDepth
|
|
12
|
+
technicalDepth?: number;
|
|
13
|
+
structuralRichness: number;
|
|
12
14
|
codeSnippetQuality: number;
|
|
13
15
|
noiseFactor: number;
|
|
16
|
+
pedagogicalRelevance?: number;
|
|
14
17
|
};
|
|
15
18
|
summary: string;
|
|
19
|
+
keyTakeaways: string[];
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* Extracts top key sentences from a document ranked by keyword overlap and structural salience (TextRank-inspired).
|
|
23
|
+
*/
|
|
24
|
+
declare function extractTopSentences(markdown: string, targetTopic: string, maxSentences?: number): string[];
|
|
25
|
+
/**
|
|
26
|
+
* Evaluates and scores evidence on a 1-10 scale and extracts real substantive takeaways
|
|
19
27
|
*/
|
|
20
28
|
declare class EvidenceScorer {
|
|
21
29
|
scoreDocument(doc: ScrapedDocument, domain: TechnicalDomain, targetTopic: string): ScoredEvidence;
|
|
30
|
+
/**
|
|
31
|
+
* Evaluates evidence with host LLM for genuine pedagogical relevance, conceptual depth,
|
|
32
|
+
* and accuracy for the target learner age band.
|
|
33
|
+
*/
|
|
34
|
+
scoreDocumentWithLlm(doc: ScrapedDocument, domain: TechnicalDomain, targetTopic: string, options?: {
|
|
35
|
+
llm?: LlmTextFn;
|
|
36
|
+
context?: CourseResearchContext;
|
|
37
|
+
}): Promise<ScoredEvidence>;
|
|
22
38
|
}
|
|
23
39
|
|
|
40
|
+
type ClaimVerdict = 'supported' | 'refuted' | 'not_enough_evidence' | 'lexical_match_only';
|
|
24
41
|
interface VerifiedClaim {
|
|
25
42
|
claimText: string;
|
|
26
43
|
sourceUrl?: string;
|
|
44
|
+
verdict: ClaimVerdict;
|
|
27
45
|
isSupported: boolean;
|
|
46
|
+
isLlmVerified: boolean;
|
|
28
47
|
confidenceScore: number;
|
|
29
48
|
extractedQuote?: string;
|
|
49
|
+
explanation?: string;
|
|
30
50
|
}
|
|
31
51
|
interface ClaimSweepReport {
|
|
32
52
|
totalClaimsChecked: number;
|
|
33
53
|
supportedClaimsCount: number;
|
|
54
|
+
refutedClaimsCount: number;
|
|
55
|
+
unverifiedClaimsCount: number;
|
|
34
56
|
hallucinationRisk: 'low' | 'medium' | 'high';
|
|
57
|
+
isLlmVerified: boolean;
|
|
35
58
|
claims: VerifiedClaim[];
|
|
36
59
|
reportMd: string;
|
|
37
60
|
}
|
|
38
61
|
/**
|
|
39
|
-
* Claim-Support Sweep & Fact Checker
|
|
62
|
+
* Claim-Support Sweep & Fact Checker
|
|
63
|
+
* Combines Deterministic Passage Retrieval (Passage Candidate Slicing)
|
|
64
|
+
* with LLM Semantic Entailment (Natural Language Inference).
|
|
40
65
|
*/
|
|
41
66
|
declare class ClaimVerifier {
|
|
42
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Deterministic lexical match baseline.
|
|
69
|
+
* Explicitly marks verdict as 'lexical_match_only' to prevent false sense of semantic verification.
|
|
70
|
+
*/
|
|
71
|
+
verifyClaimsDeterministic(claims: string[], sourceCorpus: string): ClaimSweepReport;
|
|
72
|
+
/**
|
|
73
|
+
* Primary verification interface.
|
|
74
|
+
* If an LLM callback is provided, performs genuine Semantic Entailment (NLI).
|
|
75
|
+
* Otherwise falls back to deterministic lexical retrieval with honest labeling.
|
|
76
|
+
*/
|
|
77
|
+
verifyClaims(claims: string[], sourceCorpus: string, options?: {
|
|
78
|
+
llm?: LlmTextFn;
|
|
79
|
+
}): Promise<ClaimSweepReport>;
|
|
43
80
|
}
|
|
44
81
|
|
|
45
|
-
export { type ClaimSweepReport, ClaimVerifier, EvidenceScorer, type ScoredEvidence, type VerifiedClaim };
|
|
82
|
+
export { type ClaimSweepReport, type ClaimVerdict, ClaimVerifier, EvidenceScorer, type ScoredEvidence, type VerifiedClaim, extractTopSentences };
|
package/dist/evidence/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { ClaimVerifier } from '../chunk-
|
|
2
|
-
export { EvidenceScorer, ProvenanceTracker } from '../chunk-
|
|
1
|
+
export { ClaimVerifier } from '../chunk-2XIEWCUE.js';
|
|
2
|
+
export { EvidenceScorer, ProvenanceTracker, extractTopSentences } from '../chunk-GKF3NDEX.js';
|
|
3
|
+
import '../chunk-KAFQVI2R.js';
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
|
4
5
|
//# sourceMappingURL=index.js.map
|