-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_source.yaml
More file actions
149 lines (149 loc) · 4.02 KB
/
Copy pathmake_source.yaml
File metadata and controls
149 lines (149 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
module: make_source
description: ''
tags:
- builder
- core
- loader
- storage
category: []
used_in: []
entrypoint: true
related_nodes: []
objects:
- name: EMBEDDING_MODEL
kind: const
description: ''
references: []
- name: tokenize
kind: function
decorators: []
description: ''
references: []
- name: detect_language
kind: function
decorators: []
description: ''
references:
- langdetect.LangDetectException
- langdetect.detect
- name: load_companion_yaml
kind: function
decorators: []
description: Load a companion .yaml file for an .md file if it exists.
references:
- yaml.YAMLError
- yaml.safe_load
- name: _normalize_list
kind: function
decorators: []
description: Normalize a YAML value to a list of strings.
references: []
- name: process_md_file
kind: function
decorators: []
description: ''
references: []
- name: process_go_yaml
kind: function
decorators: []
description: Process a .go.yaml companion file as structured knowledge chunks. The
.go source file is not indexed (code excluded by design); this YAML is the sole
knowledge source for Go files in the KB. Produces one chunk per object defined
in the file. File-level metadata (tags, category, used_in) is applied to all chunks.
references:
- yaml.YAMLError
- yaml.safe_load
- name: process_yaml_file
kind: function
decorators: []
description: Processes a YAML file as a single, large chunk to preserve context.
references:
- yaml.YAMLError
- yaml.dump
- yaml.safe_load
- name: create_embeddings
kind: function
decorators: []
description: Encode texts using a multilingual sentence transformer model.
references:
- numpy.array
- sentence_transformers.SentenceTransformer
- name: build_faiss_index
kind: function
decorators: []
description: Build FAISS inner-product index (cosine sim with normalized vectors).
references:
- faiss.IndexFlatIP
- name: build_bm25_index
kind: function
decorators: []
description: Build BM25 index for lexical search.
references:
- rank_bm25.BM25Okapi
- name: create_bm25_inverted_index
kind: function
decorators: []
description: Lightweight inverted index from BM25 scores (for SQLite compat).
references: []
- name: build_metadata_index
kind: function
decorators: []
description: Build O(1) lookup indexes for tags, category, used_in, entrypoints.
references: []
- name: _resolve_related_node
kind: function
decorators: []
description: Resolve a relative related_node path to chunk_ids.
references: []
- name: create_knowledge_graph_with_content
kind: function
decorators: []
description: Build knowledge graph using embedding cosine similarity + YAML related_nodes.
references: []
- name: _content_hash
kind: function
decorators: []
description: Return SHA256 hex digest of normalized text content.
references: []
- name: _dedup_chunks
kind: function
decorators: []
description: 'Deduplicate chunks with identical content. Chunks with the same text
are merged into a single chunk: - file_path : canonical (first seen) path — kept
for backward compat - file_paths : list of ALL paths where this content appears
- tags / category / used_in / related_nodes : union of all occurrences'
references: []
- name: _is_go_meta_yaml
kind: function
decorators: []
description: Return True if the YAML file is a Go meta companion (has 'package'
+ 'objects'). Used when the sibling .go file is absent (e.g. in docs-only submodules).
references:
- yaml.safe_load
- name: process_directory
kind: function
decorators: []
description: ''
references: []
- name: build_knowledge_base
kind: function
decorators: []
description: ''
references: []
- name: save_knowledge_base_legacy
kind: function
decorators: []
description: ''
references:
- faiss.write_index
- name: save_kb_to_sqlite
kind: function
decorators: []
description: ''
references: []
- name: generate_edge_types_doc
kind: function
decorators: []
description: Generates a markdown file documenting all unique edge types.
references: []