Commit bf2903a
feat(graph): Add Custom Retrievers for Spanner Graph RAG. (#122)
* Add Spanner Graph QA Chain * Formatted notebook. Added copyright message to prompts file. * Add missing imports for random graph name * Make input table name randomized in integration tests to avoid name collision for tests running parallely from different python environments * Provide timeout to graph cleanup * Make default timeout of 300 secs for ddl application * Increase timeout of integration test * Change integration test timeout * Minor formatting fixes * Make the ddl operations test fixture scoped for the module * Addressed review comments * Addressed a few other review comments. * Remove unused function * fix type check errors * Addressed review comments * Addressed review comments * Clear default project id from notebook * Add import statement for SpanerGraphQAChain to notebook * Add retrievers for Spanner Graph RAG * Add licence headers * Fix DATABASE name key * Fix lint error on import ordering * Fix lint errors * Few minor changes to the SpannerGraphNodeVectorRetriever * Fix lint error * Add an option to expand context graph by hops * Fix lint error * Addressed review comments * Remove expansion query options * Add backticks to property names * Change copyright year * Address review comments * Rename the retrievers. Merge the semantic retriever with the gql retriever. * Fixed lint errors * Change vertex ai versionto latest * Fix lint errors * Add documentation. Fixes the case where expands_by_hops is 0 * Add unit test for expand_by_hops=0 * Fix formatting for documentation * Addressed review comments --------- Co-authored-by: Amarnath Mullick <amullick@google.com>1 parent fd788d8 commit bf2903a
File tree
7 files changed
+714
-46
lines changed- docs
- src/langchain_google_spanner
- tests/integration
7 files changed
+714
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
182 | 229 | | |
183 | 230 | | |
184 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 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 | 74 | | |
119 | 75 | | |
120 | 76 | | |
| |||
0 commit comments