Coverage for /home/admin/Documents/AI/applications/lexigram-dev/lexigram/experimental/ai/lexigram-ai-rag/src/lexigram/ai/rag/synthesis/__init__.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-25 07:19 +0800

1"""Response synthesis package for RAG. 

2 

3This package provides comprehensive response synthesis capabilities including 

4multiple synthesis strategies, quality control, context management, and 

5flexible output formatting. 

6""" 

7 

8from __future__ import annotations 

9 

10# Core types 

11# Context management 

12from lexigram.ai.rag.synthesis.context import ( 

13 ContextDeduplicator, 

14 ContextRanker, 

15 LengthOptimizer, 

16) 

17 

18# Formatters 

19from lexigram.ai.rag.synthesis.formatters import ( 

20 JSONFormatter, 

21 MarkdownFormatter, 

22 PlainTextFormatter, 

23 ResponseFormatterProtocol, 

24) 

25 

26# Quality control 

27from lexigram.ai.rag.synthesis.quality import ( 

28 ConfidenceScorer, 

29 FaithfulnessChecker, 

30 HallucinationChecker, 

31 RelevanceFilter, 

32) 

33 

34# Synthesizers 

35from lexigram.ai.rag.synthesis.synthesizers import ( 

36 AbstractiveSynthesizer, 

37 AbstractSynthesizer, 

38 DirectSynthesizer, 

39 ExtractiveSynthesizer, 

40 HybridSynthesizer, 

41 ResponseSynthesizerProtocol, 

42) 

43from lexigram.ai.rag.synthesis.types import ( 

44 ContextChunk, 

45 OutputFormat, 

46 QualityMetrics, 

47 SynthesisConfig, 

48 SynthesisResult, 

49 SynthesisStrategy, 

50) 

51 

52__all__ = [ 

53 "AbstractSynthesizer", 

54 "AbstractiveSynthesizer", 

55 "ConfidenceScorer", 

56 "ContextChunk", 

57 "ContextDeduplicator", 

58 # Context 

59 "ContextRanker", 

60 "DirectSynthesizer", 

61 "ExtractiveSynthesizer", 

62 # Quality 

63 "FaithfulnessChecker", 

64 "HallucinationChecker", 

65 "HybridSynthesizer", 

66 "JSONFormatter", 

67 "LengthOptimizer", 

68 "MarkdownFormatter", 

69 "OutputFormat", 

70 "PlainTextFormatter", 

71 "QualityMetrics", 

72 "RelevanceFilter", 

73 # Formatters 

74 "ResponseFormatterProtocol", 

75 # Synthesizers 

76 "ResponseSynthesizerProtocol", 

77 "SynthesisConfig", 

78 "SynthesisResult", 

79 # Types 

80 "SynthesisStrategy", 

81]