sdg-hub 0.3.1__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- sdg_hub/_version.py +2 -2
- sdg_hub/core/blocks/__init__.py +2 -4
- sdg_hub/core/blocks/base.py +61 -6
- sdg_hub/core/blocks/filtering/column_value_filter.py +3 -2
- sdg_hub/core/blocks/llm/__init__.py +2 -4
- sdg_hub/core/blocks/llm/llm_chat_block.py +251 -265
- sdg_hub/core/blocks/llm/llm_chat_with_parsing_retry_block.py +216 -98
- sdg_hub/core/blocks/llm/llm_parser_block.py +320 -0
- sdg_hub/core/blocks/llm/text_parser_block.py +53 -152
- sdg_hub/core/flow/base.py +7 -4
- sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/detailed_summary/flow.yaml +51 -11
- sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/doc_direct_qa/__init__.py +0 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/doc_direct_qa/flow.yaml +159 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/extractive_summary/flow.yaml +51 -11
- sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/key_facts/flow.yaml +14 -2
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/flow.yaml +146 -26
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/README.md +0 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/__init__.py +0 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/atomic_facts_ja.yaml +41 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/detailed_summary_ja.yaml +14 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/extractive_summary_ja.yaml +14 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/flow.yaml +304 -0
- sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/generate_questions_responses_ja.yaml +55 -0
- sdg_hub/flows/text_analysis/structured_insights/flow.yaml +28 -4
- {sdg_hub-0.3.1.dist-info → sdg_hub-0.4.0.dist-info}/METADATA +1 -1
- {sdg_hub-0.3.1.dist-info → sdg_hub-0.4.0.dist-info}/RECORD +29 -25
- sdg_hub/core/blocks/evaluation/__init__.py +0 -9
- sdg_hub/core/blocks/evaluation/evaluate_faithfulness_block.py +0 -323
- sdg_hub/core/blocks/evaluation/evaluate_relevancy_block.py +0 -323
- sdg_hub/core/blocks/evaluation/verify_question_block.py +0 -329
- sdg_hub/core/blocks/llm/client_manager.py +0 -472
- sdg_hub/core/blocks/llm/config.py +0 -337
- {sdg_hub-0.3.1.dist-info → sdg_hub-0.4.0.dist-info}/WHEEL +0 -0
- {sdg_hub-0.3.1.dist-info → sdg_hub-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {sdg_hub-0.3.1.dist-info → sdg_hub-0.4.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
- role: system
|
2
|
+
content: You are an AI assistant that is expert at summarizing text.
|
3
|
+
|
4
|
+
- role: user
|
5
|
+
content: |
|
6
|
+
Give me detailed extractive summary for below document, making sure all key points are covered.
|
7
|
+
|
8
|
+
Do not add any new information.
|
9
|
+
Do not miss any key points from the provided document.
|
10
|
+
Output the response in Japanese.
|
11
|
+
|
12
|
+
Document:
|
13
|
+
{{document_outline}}
|
14
|
+
{{document}}
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/flow.yaml
ADDED
@@ -0,0 +1,304 @@
|
|
1
|
+
metadata:
|
2
|
+
id: clean-shadow-397
|
3
|
+
name: "Advanced Japanese Document Grounded Question-Answer Generation Flow for Knowledge Tuning"
|
4
|
+
description: "A comprehensive flow that generates high-quality question-answer pairs from Japanese input documents using multiple LLM blocks for question generation, answer synthesis, and quality evaluation."
|
5
|
+
version: "1.0.0"
|
6
|
+
author: "SDG Hub Contributors"
|
7
|
+
|
8
|
+
recommended_models:
|
9
|
+
default: "microsoft/phi-4"
|
10
|
+
compatible: ["meta-llama/Llama-3.3-70B-Instruct", "mistralai/Mixtral-8x7B-Instruct-v0.1"]
|
11
|
+
experimental: []
|
12
|
+
|
13
|
+
tags:
|
14
|
+
- "question-generation"
|
15
|
+
- "knowledge-extraction"
|
16
|
+
- "qa-pairs"
|
17
|
+
- "document-processing"
|
18
|
+
- "educational"
|
19
|
+
- "japanese"
|
20
|
+
|
21
|
+
license: "Apache-2.0"
|
22
|
+
min_sdg_hub_version: "0.2.0"
|
23
|
+
|
24
|
+
dataset_requirements:
|
25
|
+
required_columns:
|
26
|
+
- "document"
|
27
|
+
- "document_outline"
|
28
|
+
- "domain"
|
29
|
+
- "icl_document"
|
30
|
+
- "icl_query_1"
|
31
|
+
- "icl_response_1"
|
32
|
+
- "icl_query_2"
|
33
|
+
- "icl_response_2"
|
34
|
+
- "icl_query_3"
|
35
|
+
- "icl_response_3"
|
36
|
+
description: "Input dataset should contain documents with Japanese text content and domain classification. Each document should be substantial enough for meaningful question generation (minimum 100 words recommended)."
|
37
|
+
|
38
|
+
blocks:
|
39
|
+
- block_type: DuplicateColumnsBlock
|
40
|
+
block_config:
|
41
|
+
block_name: duplicate_document_col
|
42
|
+
input_cols: {document: base_document}
|
43
|
+
|
44
|
+
- block_type: PromptBuilderBlock
|
45
|
+
block_config:
|
46
|
+
block_name: detailed_summary_prompt
|
47
|
+
input_cols: [document, document_outline]
|
48
|
+
output_cols: summary_prompt
|
49
|
+
prompt_config_path: detailed_summary_ja.yaml
|
50
|
+
|
51
|
+
- block_type: LLMChatBlock
|
52
|
+
block_config:
|
53
|
+
block_name: gen_detailed_summary
|
54
|
+
input_cols: summary_prompt
|
55
|
+
output_cols: raw_summary_detailed
|
56
|
+
max_tokens: 2048
|
57
|
+
async_mode: true
|
58
|
+
|
59
|
+
- block_type: LLMParserBlock
|
60
|
+
block_config:
|
61
|
+
block_name: extract_detailed_summary
|
62
|
+
input_cols: raw_summary_detailed
|
63
|
+
extract_content: true
|
64
|
+
|
65
|
+
- block_type: TextParserBlock
|
66
|
+
block_config:
|
67
|
+
block_name: parse_detailed_summary
|
68
|
+
input_cols: extract_detailed_summary_content
|
69
|
+
output_cols: summary_detailed
|
70
|
+
start_tags: [""]
|
71
|
+
end_tags: [""]
|
72
|
+
|
73
|
+
- block_type: PromptBuilderBlock
|
74
|
+
block_config:
|
75
|
+
block_name: atomic_facts_prompt
|
76
|
+
input_cols: [document, document_outline, domain]
|
77
|
+
output_cols: atomic_facts_prompt
|
78
|
+
prompt_config_path: atomic_facts_ja.yaml
|
79
|
+
|
80
|
+
- block_type: LLMChatBlock
|
81
|
+
block_config:
|
82
|
+
block_name: gen_atomic_facts
|
83
|
+
input_cols: atomic_facts_prompt
|
84
|
+
output_cols: raw_atomic_facts
|
85
|
+
max_tokens: 2048
|
86
|
+
async_mode: true
|
87
|
+
|
88
|
+
- block_type: LLMParserBlock
|
89
|
+
block_config:
|
90
|
+
block_name: extract_atomic_facts
|
91
|
+
input_cols: raw_atomic_facts
|
92
|
+
extract_content: true
|
93
|
+
|
94
|
+
- block_type: TextParserBlock
|
95
|
+
block_config:
|
96
|
+
block_name: parse_atomic_facts
|
97
|
+
input_cols: extract_atomic_facts_content
|
98
|
+
output_cols: summary_atomic_facts
|
99
|
+
start_tags: [""]
|
100
|
+
end_tags: [""]
|
101
|
+
|
102
|
+
- block_type: PromptBuilderBlock
|
103
|
+
block_config:
|
104
|
+
block_name: extractive_summary_prompt
|
105
|
+
input_cols: [document, document_outline]
|
106
|
+
output_cols: extractive_summary_prompt
|
107
|
+
prompt_config_path: extractive_summary_ja.yaml
|
108
|
+
|
109
|
+
- block_type: LLMChatBlock
|
110
|
+
block_config:
|
111
|
+
block_name: gen_extractive_summary
|
112
|
+
input_cols: extractive_summary_prompt
|
113
|
+
output_cols: raw_summary_extractive
|
114
|
+
max_tokens: 2048
|
115
|
+
async_mode: true
|
116
|
+
|
117
|
+
- block_type: LLMParserBlock
|
118
|
+
block_config:
|
119
|
+
block_name: extract_extractive_summary
|
120
|
+
input_cols: raw_summary_extractive
|
121
|
+
extract_content: true
|
122
|
+
|
123
|
+
- block_type: TextParserBlock
|
124
|
+
block_config:
|
125
|
+
block_name: parse_extractive_summary
|
126
|
+
input_cols: extract_extractive_summary_content
|
127
|
+
output_cols: summary_extractive
|
128
|
+
start_tags: [""]
|
129
|
+
end_tags: [""]
|
130
|
+
|
131
|
+
- block_type: MeltColumnsBlock
|
132
|
+
block_config:
|
133
|
+
block_name: melt_summary_columns
|
134
|
+
input_cols: [summary_detailed, summary_extractive, summary_atomic_facts, base_document]
|
135
|
+
output_cols: [summary, dataset_type]
|
136
|
+
|
137
|
+
- block_type: RenameColumnsBlock
|
138
|
+
block_config:
|
139
|
+
block_name: rename_to_document_column
|
140
|
+
input_cols: {document: raw_document, summary: document}
|
141
|
+
|
142
|
+
- block_type: PromptBuilderBlock
|
143
|
+
block_config:
|
144
|
+
block_name: knowledge_generation_prompt
|
145
|
+
input_cols: [domain, document, document_outline, icl_document, icl_query_1, icl_response_1, icl_query_2, icl_response_2, icl_query_3, icl_response_3]
|
146
|
+
output_cols: knowledge_generation_prompt
|
147
|
+
prompt_config_path: generate_questions_responses_ja.yaml
|
148
|
+
|
149
|
+
- block_type: LLMChatBlock
|
150
|
+
block_config:
|
151
|
+
block_name: knowledge_generation
|
152
|
+
input_cols: knowledge_generation_prompt
|
153
|
+
output_cols: raw_knowledge_generation
|
154
|
+
temperature: 0.0
|
155
|
+
max_tokens: 2048
|
156
|
+
async_mode: true
|
157
|
+
|
158
|
+
- block_type: LLMParserBlock
|
159
|
+
block_config:
|
160
|
+
block_name: extract_knowledge_generation
|
161
|
+
input_cols: raw_knowledge_generation
|
162
|
+
extract_content: true
|
163
|
+
|
164
|
+
- block_type: TextParserBlock
|
165
|
+
block_config:
|
166
|
+
block_name: parse_knowledge_generation
|
167
|
+
input_cols: extract_knowledge_generation_content
|
168
|
+
output_cols: [question, response]
|
169
|
+
parsing_pattern: "\\[(?:Question|QUESTION)\\]\\s*(.*?)\\s*\\[(?:Answer|ANSWER)\\]\\s*(.*?)\\s*(?=\\[(?:Question|QUESTION)\\]|$)"
|
170
|
+
parser_cleanup_tags: ["[END]"]
|
171
|
+
|
172
|
+
- block_type: PromptBuilderBlock
|
173
|
+
block_config:
|
174
|
+
block_name: eval_faithful_prompt
|
175
|
+
input_cols: [document, response]
|
176
|
+
output_cols: eval_faithful_prompt
|
177
|
+
prompt_config_path: ../../instructlab/evaluate_faithfulness.yaml
|
178
|
+
format_as_messages: true
|
179
|
+
|
180
|
+
- block_type: LLMChatBlock
|
181
|
+
block_config:
|
182
|
+
block_name: eval_faithful_llm_chat
|
183
|
+
input_cols: eval_faithful_prompt
|
184
|
+
output_cols: eval_faithful_response_dict
|
185
|
+
max_tokens: 2048
|
186
|
+
n: 1
|
187
|
+
async_mode: true
|
188
|
+
|
189
|
+
- block_type: LLMParserBlock
|
190
|
+
block_config:
|
191
|
+
block_name: extract_eval_faithful
|
192
|
+
input_cols: eval_faithful_response_dict
|
193
|
+
extract_content: true
|
194
|
+
|
195
|
+
- block_type: TextParserBlock
|
196
|
+
block_config:
|
197
|
+
block_name: parse_eval_faithful
|
198
|
+
input_cols: extract_eval_faithful_content
|
199
|
+
output_cols:
|
200
|
+
- faithfulness_explanation
|
201
|
+
- faithfulness_judgment
|
202
|
+
start_tags:
|
203
|
+
- '[Start of Explanation]'
|
204
|
+
- '[Start of Answer]'
|
205
|
+
end_tags:
|
206
|
+
- '[End of Explanation]'
|
207
|
+
- '[End of Answer]'
|
208
|
+
|
209
|
+
- block_type: ColumnValueFilterBlock
|
210
|
+
block_config:
|
211
|
+
block_name: eval_faithful_filter
|
212
|
+
input_cols:
|
213
|
+
- faithfulness_judgment
|
214
|
+
filter_value: "YES"
|
215
|
+
operation: eq
|
216
|
+
|
217
|
+
- block_type: PromptBuilderBlock
|
218
|
+
block_config:
|
219
|
+
block_name: eval_relevancy_prompt
|
220
|
+
input_cols:
|
221
|
+
- question
|
222
|
+
- response
|
223
|
+
output_cols: eval_relevancy_prompt
|
224
|
+
prompt_config_path: ../../instructlab/evaluate_relevancy.yaml
|
225
|
+
format_as_messages: true
|
226
|
+
- block_type: LLMChatBlock
|
227
|
+
block_config:
|
228
|
+
block_name: eval_relevancy_llm_chat
|
229
|
+
input_cols: eval_relevancy_prompt
|
230
|
+
output_cols: eval_relevancy_response_dict
|
231
|
+
max_tokens: 2048
|
232
|
+
n: 1
|
233
|
+
async_mode: true
|
234
|
+
- block_type: LLMParserBlock
|
235
|
+
block_config:
|
236
|
+
block_name: extract_eval_relevancy
|
237
|
+
input_cols: eval_relevancy_response_dict
|
238
|
+
extract_content: true
|
239
|
+
|
240
|
+
- block_type: TextParserBlock
|
241
|
+
block_config:
|
242
|
+
block_name: parse_eval_relevancy
|
243
|
+
input_cols: extract_eval_relevancy_content
|
244
|
+
output_cols:
|
245
|
+
- relevancy_explanation
|
246
|
+
- relevancy_score
|
247
|
+
start_tags:
|
248
|
+
- '[Start of Feedback]'
|
249
|
+
- '[Start of Score]'
|
250
|
+
end_tags:
|
251
|
+
- '[End of Feedback]'
|
252
|
+
- '[End of Score]'
|
253
|
+
- block_type: ColumnValueFilterBlock
|
254
|
+
block_config:
|
255
|
+
block_name: eval_relevancy_filter
|
256
|
+
input_cols:
|
257
|
+
- relevancy_score
|
258
|
+
filter_value: 2.0
|
259
|
+
operation: eq
|
260
|
+
convert_dtype: float
|
261
|
+
|
262
|
+
- block_type: PromptBuilderBlock
|
263
|
+
block_config:
|
264
|
+
block_name: verify_question_prompt
|
265
|
+
input_cols:
|
266
|
+
- question
|
267
|
+
output_cols: verify_question_prompt
|
268
|
+
prompt_config_path: ../../instructlab/evaluate_question.yaml
|
269
|
+
format_as_messages: true
|
270
|
+
- block_type: LLMChatBlock
|
271
|
+
block_config:
|
272
|
+
block_name: verify_question_llm_chat
|
273
|
+
input_cols: verify_question_prompt
|
274
|
+
output_cols: verify_question_response_dict
|
275
|
+
max_tokens: 2048
|
276
|
+
n: 1
|
277
|
+
async_mode: true
|
278
|
+
- block_type: LLMParserBlock
|
279
|
+
block_config:
|
280
|
+
block_name: extract_verify_question
|
281
|
+
input_cols: verify_question_response_dict
|
282
|
+
extract_content: true
|
283
|
+
|
284
|
+
- block_type: TextParserBlock
|
285
|
+
block_config:
|
286
|
+
block_name: parse_verify_question
|
287
|
+
input_cols: extract_verify_question_content
|
288
|
+
output_cols:
|
289
|
+
- verification_explanation
|
290
|
+
- verification_rating
|
291
|
+
start_tags:
|
292
|
+
- '[Start of Explanation]'
|
293
|
+
- '[Start of Rating]'
|
294
|
+
end_tags:
|
295
|
+
- '[End of Explanation]'
|
296
|
+
- '[End of Rating]'
|
297
|
+
- block_type: ColumnValueFilterBlock
|
298
|
+
block_config:
|
299
|
+
block_name: verify_question_filter
|
300
|
+
input_cols:
|
301
|
+
- verification_rating
|
302
|
+
filter_value: 1.0
|
303
|
+
operation: ge
|
304
|
+
convert_dtype: float
|
@@ -0,0 +1,55 @@
|
|
1
|
+
- role: system
|
2
|
+
content: You are a very knowledgeable AI Assistant that will faithfully assist the user with their task.
|
3
|
+
|
4
|
+
- role: user
|
5
|
+
content: |
|
6
|
+
Develop a series of as many educational question and answer pairs as possible from a chapter in a {{domain}} textbook.
|
7
|
+
|
8
|
+
The questions should:
|
9
|
+
* Be self-contained, not requiring references to tables, figures, or specific sections in the text for understanding.
|
10
|
+
* Focus on teaching and reinforcing the key knowledge and concepts presented in the chapter.
|
11
|
+
* Avoid sections with minimal educational content like index pages or prefaces. In such cases, respond with [UNANSWERABLE].
|
12
|
+
* Be directly relevant to the textbook's domain. For instance, in a science textbook, questions should revolve around scientific terms, definitions, and practical applications, while in a legal textbook, they should cover legal principles, case law, and precedents.
|
13
|
+
* Be formulated to allow for independent answers, avoiding direct references to specific theorems or text sections. For example, rather than asking 'Under what conditions is the fixed point of a function unique according to Theorem 3.1.5?', ask 'How does the Fixed Point Iteration method contribute to understanding function uniqueness?'
|
14
|
+
* Span a range of difficulty levels to accommodate a diverse student audience, from basic understanding to advanced comprehension.
|
15
|
+
* Include a variety of question types such as multiple-choice for basic recall, short answer for deeper understanding, and essay or problem-solving questions to test application and analysis skills.
|
16
|
+
* Align closely with the learning objectives of the textbook or the specific chapter, ensuring that the questions test the fundamental concepts and skills that the chapter aims to impart.
|
17
|
+
* Be in Japanese.
|
18
|
+
|
19
|
+
Strictly follow this format for each question answer pair your generate while responding:
|
20
|
+
|
21
|
+
[QUESTION]
|
22
|
+
<Insert question here>
|
23
|
+
[ANSWER]
|
24
|
+
<Insert answer here>
|
25
|
+
[END]
|
26
|
+
|
27
|
+
Each question and answer pair should stand alone as a mini-lesson, encapsulating a key concept or idea from the chapter in a way that is accessible and informative without requiring the reader to refer back to the textbook.
|
28
|
+
|
29
|
+
Here are some examples of questions:
|
30
|
+
|
31
|
+
[Document]
|
32
|
+
{{icl_document}}
|
33
|
+
|
34
|
+
[QUESTION]
|
35
|
+
{{icl_query_1}}
|
36
|
+
[ANSWER]
|
37
|
+
{{icl_response_1}}
|
38
|
+
[END]
|
39
|
+
|
40
|
+
[QUESTION]
|
41
|
+
{{icl_query_2}}
|
42
|
+
[ANSWER]
|
43
|
+
{{icl_response_2}}
|
44
|
+
[END]
|
45
|
+
|
46
|
+
[QUESTION]
|
47
|
+
{{icl_query_3}}
|
48
|
+
[ANSWER]
|
49
|
+
{{icl_response_3}}
|
50
|
+
[END]
|
51
|
+
|
52
|
+
Now, here is the document:
|
53
|
+
[DOCUMENT]
|
54
|
+
{{document_outline}}
|
55
|
+
{{document}}
|
@@ -50,10 +50,16 @@ blocks:
|
|
50
50
|
max_tokens: 1024
|
51
51
|
temperature: 0.3
|
52
52
|
async_mode: true
|
53
|
+
- block_type: "LLMParserBlock"
|
54
|
+
block_config:
|
55
|
+
block_name: "extract_summary"
|
56
|
+
input_cols: "raw_summary"
|
57
|
+
extract_content: true
|
58
|
+
expand_lists: true
|
53
59
|
- block_type: "TextParserBlock"
|
54
60
|
block_config:
|
55
61
|
block_name: "parse_summary"
|
56
|
-
input_cols: "
|
62
|
+
input_cols: "extract_summary_content"
|
57
63
|
output_cols: "summary"
|
58
64
|
start_tags:
|
59
65
|
- "[SUMMARY]"
|
@@ -76,10 +82,16 @@ blocks:
|
|
76
82
|
max_tokens: 512
|
77
83
|
temperature: 0.3
|
78
84
|
async_mode: true
|
85
|
+
- block_type: "LLMParserBlock"
|
86
|
+
block_config:
|
87
|
+
block_name: "extract_keywords"
|
88
|
+
input_cols: "raw_keywords"
|
89
|
+
extract_content: true
|
90
|
+
expand_lists: true
|
79
91
|
- block_type: "TextParserBlock"
|
80
92
|
block_config:
|
81
93
|
block_name: "parse_keywords"
|
82
|
-
input_cols: "
|
94
|
+
input_cols: "extract_keywords_content"
|
83
95
|
output_cols: "keywords"
|
84
96
|
start_tags:
|
85
97
|
- "[KEYWORDS]"
|
@@ -102,10 +114,16 @@ blocks:
|
|
102
114
|
max_tokens: 1024
|
103
115
|
temperature: 0.3
|
104
116
|
async_mode: true
|
117
|
+
- block_type: "LLMParserBlock"
|
118
|
+
block_config:
|
119
|
+
block_name: "extract_entities"
|
120
|
+
input_cols: "raw_entities"
|
121
|
+
extract_content: true
|
122
|
+
expand_lists: true
|
105
123
|
- block_type: "TextParserBlock"
|
106
124
|
block_config:
|
107
125
|
block_name: "parse_entities"
|
108
|
-
input_cols: "
|
126
|
+
input_cols: "extract_entities_content"
|
109
127
|
output_cols: "entities"
|
110
128
|
start_tags:
|
111
129
|
- "[ENTITIES]"
|
@@ -128,10 +146,16 @@ blocks:
|
|
128
146
|
max_tokens: 256
|
129
147
|
temperature: 0.1
|
130
148
|
async_mode: true
|
149
|
+
- block_type: "LLMParserBlock"
|
150
|
+
block_config:
|
151
|
+
block_name: "extract_sentiment"
|
152
|
+
input_cols: "raw_sentiment"
|
153
|
+
extract_content: true
|
154
|
+
expand_lists: true
|
131
155
|
- block_type: "TextParserBlock"
|
132
156
|
block_config:
|
133
157
|
block_name: "parse_sentiment"
|
134
|
-
input_cols: "
|
158
|
+
input_cols: "extract_sentiment_content"
|
135
159
|
output_cols: "sentiment"
|
136
160
|
start_tags:
|
137
161
|
- "[SENTIMENT]"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
sdg_hub/__init__.py,sha256=Tw-6R5a8_W1kJcTAsW3R9ltBDP1dy5-fe7Tvt3cSyCQ,550
|
2
|
-
sdg_hub/_version.py,sha256=
|
2
|
+
sdg_hub/_version.py,sha256=2_0GUP7yBCXRus-qiJKxQD62z172WSs1sQ6DVpPsbmM,704
|
3
3
|
sdg_hub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
sdg_hub/core/__init__.py,sha256=NwqB4fwhC29W50VW7QXZssLxx122YvgO9LHDLdgAnrI,496
|
5
|
-
sdg_hub/core/blocks/__init__.py,sha256=
|
6
|
-
sdg_hub/core/blocks/base.py,sha256
|
5
|
+
sdg_hub/core/blocks/__init__.py,sha256=5FsbkcO-dmBv6MqO96TPn9FKKPTQZQCv20j4wR7UvQw,1502
|
6
|
+
sdg_hub/core/blocks/base.py,sha256=-SOdBpJwtRTMsrmCEuLjUBQMRCo_PLYlHEBRrz8sF9g,13031
|
7
7
|
sdg_hub/core/blocks/registry.py,sha256=FuEN_pnq-nSH1LguY3_oCubT6Kz3SuJjk3TcUpLT-lw,10695
|
8
8
|
sdg_hub/core/blocks/deprecated_blocks/__init__.py,sha256=RDu3MWFStDQko-TKkx8tGoB1UTatP_RSldZK43zHDvY,889
|
9
9
|
sdg_hub/core/blocks/deprecated_blocks/combine_columns.py,sha256=HCvpaYsAwgx1Dm0vIshcWsKoVsRT0KrmKp9j4oqtByc,2757
|
@@ -15,20 +15,15 @@ sdg_hub/core/blocks/deprecated_blocks/rename_columns.py,sha256=thp-mHtkRmUw_nYKp
|
|
15
15
|
sdg_hub/core/blocks/deprecated_blocks/sample_populator.py,sha256=UdueMApxOmPWaxxMrw7b1v74fKJBfqqRATEBqgmVtNw,1737
|
16
16
|
sdg_hub/core/blocks/deprecated_blocks/selector.py,sha256=nWecsVsW8DvBcqAF_LOqXmW-5MQ28uN3d1y6wkSy38c,2960
|
17
17
|
sdg_hub/core/blocks/deprecated_blocks/set_to_majority_value.py,sha256=44TQu-rK5isia-otMVB1zHd8D-wWmu3C8CI1NLtfY5s,2729
|
18
|
-
sdg_hub/core/blocks/evaluation/__init__.py,sha256=kFXee-vsVVdU2XtLio9qHgPx_a0zoB_rQr509EKBGJc,357
|
19
|
-
sdg_hub/core/blocks/evaluation/evaluate_faithfulness_block.py,sha256=vFi3YIxVPNnzgdenIeAl7yUb4OOUY_uUOXS-pWLsDmw,12223
|
20
|
-
sdg_hub/core/blocks/evaluation/evaluate_relevancy_block.py,sha256=NXT1lixR-JnOXNlBCbMjULcpu4kh2SthhwCWEobiBt0,12115
|
21
|
-
sdg_hub/core/blocks/evaluation/verify_question_block.py,sha256=LKoIHdxUuTVO24n_M9cAliEj56uEe2kQAecKTRz65zI,12465
|
22
18
|
sdg_hub/core/blocks/filtering/__init__.py,sha256=isxSVSvDqkMjG8dQSl3Q2M4g5c1t9fTjBSA21icf-yA,275
|
23
|
-
sdg_hub/core/blocks/filtering/column_value_filter.py,sha256=
|
24
|
-
sdg_hub/core/blocks/llm/__init__.py,sha256=
|
25
|
-
sdg_hub/core/blocks/llm/client_manager.py,sha256=6RNqYvFIh4SF6jopI6tTY5MA01y8Qo-tAhsE0GeHZZ0,16109
|
26
|
-
sdg_hub/core/blocks/llm/config.py,sha256=gc4xp5D20MSlKMFEos0QAaKUwgbZpBtMGXmn6LsIk78,11289
|
19
|
+
sdg_hub/core/blocks/filtering/column_value_filter.py,sha256=2Z9j_CiiTn5mHZ9gfXU-itLXDmeXSh0UI0x1x7j-LQ0,6001
|
20
|
+
sdg_hub/core/blocks/llm/__init__.py,sha256=AyS0dd3pkPPXH5a9aj4mT5HsKjX2vjXfkmQc6rkFV4A,795
|
27
21
|
sdg_hub/core/blocks/llm/error_handler.py,sha256=7T-019ZFB9qgZoX1ybIiXyaLjPzrF96qcKmUu6vmO6g,12178
|
28
|
-
sdg_hub/core/blocks/llm/llm_chat_block.py,sha256=
|
29
|
-
sdg_hub/core/blocks/llm/llm_chat_with_parsing_retry_block.py,sha256=
|
22
|
+
sdg_hub/core/blocks/llm/llm_chat_block.py,sha256=MHhI2x9i6LrfDXgvAy2_6YxgyoD7j6BpCgNGsM69xDg,22194
|
23
|
+
sdg_hub/core/blocks/llm/llm_chat_with_parsing_retry_block.py,sha256=DW4b09IqXmcshvXawFheDyaLp3rz7vpO5VBrKdUQYW8,31703
|
24
|
+
sdg_hub/core/blocks/llm/llm_parser_block.py,sha256=aoHqsDDhaIgCDfPpv7acc0DVN-zUgzFflRVB4win0aM,12012
|
30
25
|
sdg_hub/core/blocks/llm/prompt_builder_block.py,sha256=fkJd718X1oYlMY1cjo_8WCO16Gl8Tm0bUPWR78E_uws,13935
|
31
|
-
sdg_hub/core/blocks/llm/text_parser_block.py,sha256=
|
26
|
+
sdg_hub/core/blocks/llm/text_parser_block.py,sha256=975HK6NfXiU9Any4UDMpBNidRpyhHmc76BXUN69SVyc,12566
|
32
27
|
sdg_hub/core/blocks/transform/__init__.py,sha256=lF9InjOzA6p_mjiwV-a2Kwstq9kqRiQ-dEwbsmR9yQs,825
|
33
28
|
sdg_hub/core/blocks/transform/duplicate_columns.py,sha256=SaP7rIF4ZFEFFa50aU2xGNIuddXaEZrKxdWfHjzFpVI,2833
|
34
29
|
sdg_hub/core/blocks/transform/index_based_mapper.py,sha256=XC_a7Skbd3mu7f4ra8fGWPxMwqUMSjJkQ7Ag7vflwJA,8235
|
@@ -38,7 +33,7 @@ sdg_hub/core/blocks/transform/rename_columns.py,sha256=qeB5L2utqDQnutUetH1VKZSqD
|
|
38
33
|
sdg_hub/core/blocks/transform/text_concat.py,sha256=_-B__Hob1WwgwkILPIZvTnsDzuwtoX1hKviyzHlnnes,3149
|
39
34
|
sdg_hub/core/blocks/transform/uniform_col_val_setter.py,sha256=XnjiT29z3PzIPy8M-mmE2w-Miab6Ed5ahy32SaxTCTE,3263
|
40
35
|
sdg_hub/core/flow/__init__.py,sha256=N2NZGngvd7qpT5FI_knKukUFM0IkD9K5jdTi-gDeUI4,475
|
41
|
-
sdg_hub/core/flow/base.py,sha256=
|
36
|
+
sdg_hub/core/flow/base.py,sha256=6UlQ7ymVNs03UQ4NNgD15Y6eFyKPcl5JpuWOZuY70Mo,56654
|
42
37
|
sdg_hub/core/flow/checkpointer.py,sha256=stm5ZtjjEiLk9ZkAAnoQQn5Y8Yl_d7qCsQLZTrCXR48,11867
|
43
38
|
sdg_hub/core/flow/metadata.py,sha256=h9jpvAzWsF5n4ztZMzwa9ZNgnzKTHmFWdn7YbyJLHCw,12977
|
44
39
|
sdg_hub/core/flow/migration.py,sha256=6and-RBqV0t2gRipr1GiOOVnyBJdtyyjw1kO08Z--d4,7558
|
@@ -59,12 +54,14 @@ sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/gener
|
|
59
54
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/generate_question_list.yaml,sha256=qHOgUNrQz2vjUjJiEHNGWxDDXwjJlP1kofTxeGgLyPI,1461
|
60
55
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/detailed_summary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
61
56
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/detailed_summary/detailed_summary.yaml,sha256=Ik6gAml0O-jPq8jpXBAkURzYkQuFOnDZb4LDwjmfAiE,381
|
62
|
-
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/detailed_summary/flow.yaml,sha256=
|
57
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/detailed_summary/flow.yaml,sha256=_h_EFdxen842BeJd20soaCeR4eccccxAerUV6myUefE,5567
|
58
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/doc_direct_qa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/doc_direct_qa/flow.yaml,sha256=OJDlm8uGNqGPertACSG5pKKVGOKdfsQ6RMeh4UHZMJs,4442
|
63
60
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/extractive_summary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
61
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/extractive_summary/extractive_summary.yaml,sha256=SeapWoOx3fhN5SvWYuHss_9prLE8xSkOic7JkbDHSR0,4081
|
65
|
-
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/extractive_summary/flow.yaml,sha256=
|
62
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/extractive_summary/flow.yaml,sha256=Yy6-2Vytdr4FPxC5wTQkcv7Amy-DBMA3H8vOx9tBB9U,5735
|
66
63
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/key_facts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
|
-
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/key_facts/flow.yaml,sha256=
|
64
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/key_facts/flow.yaml,sha256=QYN-zNl0YtqKXCTpMJBD9vbYsTf-30cap9ziiDwxKk0,3248
|
68
65
|
sdg_hub/flows/qa_generation/document_grounded_qa/enhanced_multi_summary_qa/key_facts/key_facts_summary.yaml,sha256=YKMX_CuvcThG_bdNCAIXdVBkMvB72I89RGq2ltSSgc8,3298
|
69
66
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
67
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -74,17 +71,24 @@ sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/ev
|
|
74
71
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/evaluate_question.yaml,sha256=zwzklXup6khRkR88avgrJTcjaMcV1wnbeYaML5oPuNs,1767
|
75
72
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/evaluate_relevancy.yaml,sha256=cA8igo7jMrRXaWW6k0of6KOp7YnxLtPj0fP4DbrmZNQ,3647
|
76
73
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/extractive_summary.yaml,sha256=fcMV7LaCFZo4D29nwhGJXqFFuZMYVLo9XYjv8zcU6zs,364
|
77
|
-
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/flow.yaml,sha256=
|
74
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/flow.yaml,sha256=QOhucXsokNEXGdXtk38qxQnSDwiCngUciXRjBqDcnDU,9088
|
78
75
|
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/instructlab/generate_questions_responses.yaml,sha256=yX8aLY8dJSDML9ZJhnj9RzPbN8tH2xfcM4Gc6xZuwqQ,2596
|
76
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
78
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/atomic_facts_ja.yaml,sha256=OjPZaSCOSLxEWgW3pmNwF7mmLhGhFGTmKL_3rKdqeW4,2488
|
79
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/detailed_summary_ja.yaml,sha256=nEy_RcotHGiiENrmUANpKkbIFsrARAeSwECrBeHi2so,391
|
80
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/extractive_summary_ja.yaml,sha256=V90W0IeJQZTFThA8v0UOs3DtZbtU3BI9jkpChw1BULo,402
|
81
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/flow.yaml,sha256=ittFo_tyvG_1eqooO_9NK4jqepafgpHFGy2fuVfjFto,9207
|
82
|
+
sdg_hub/flows/qa_generation/document_grounded_qa/multi_summary_qa/multilingual/japanese/generate_questions_responses_ja.yaml,sha256=96SQqXG7fmb-50SdX85sgVtrFcQ-oNKe_0BoQdZmY5g,2638
|
79
83
|
sdg_hub/flows/text_analysis/__init__.py,sha256=WStks4eM_KHNTVsHglcj8vFghmI0PH9P1hUrijBLbwc,125
|
80
84
|
sdg_hub/flows/text_analysis/structured_insights/__init__.py,sha256=_DT4NR05JD9CZoSWROPr2lC6se0VjSqQPZJJlEV79mk,274
|
81
85
|
sdg_hub/flows/text_analysis/structured_insights/analyze_sentiment.yaml,sha256=1YGPypFJYS8qfYFj2J6ERTgodKJvMF4YHNGt_vOF5qc,1000
|
82
86
|
sdg_hub/flows/text_analysis/structured_insights/extract_entities.yaml,sha256=Q_SDy14Zu-qS2sbKfUBmGlYj3k7CUg6HzzXlFCXRKuU,1169
|
83
87
|
sdg_hub/flows/text_analysis/structured_insights/extract_keywords.yaml,sha256=_nPPMdHnxag_lYbhYUjGJGo-CvRwWvwdGX7cQhdZ1S0,847
|
84
|
-
sdg_hub/flows/text_analysis/structured_insights/flow.yaml,sha256=
|
88
|
+
sdg_hub/flows/text_analysis/structured_insights/flow.yaml,sha256=Qpo9WPtl0PWhBF1stIM8OjaTvhtw3dn4eDADt-xj5cA,4965
|
85
89
|
sdg_hub/flows/text_analysis/structured_insights/summarize.yaml,sha256=WXwQak1pF8e1OwnOoI1EHu8QB6iUNW89rfkTdi1Oq54,687
|
86
|
-
sdg_hub-0.
|
87
|
-
sdg_hub-0.
|
88
|
-
sdg_hub-0.
|
89
|
-
sdg_hub-0.
|
90
|
-
sdg_hub-0.
|
90
|
+
sdg_hub-0.4.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
91
|
+
sdg_hub-0.4.0.dist-info/METADATA,sha256=SPjLdht-43yAyDwZzdk91SYoQn8jRbsCTr4qBkXVVlw,9735
|
92
|
+
sdg_hub-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
93
|
+
sdg_hub-0.4.0.dist-info/top_level.txt,sha256=TqI7d-HE1n6zkXFkU0nF3A1Ct0P0pBaqI675uFokhx4,8
|
94
|
+
sdg_hub-0.4.0.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# SPDX-License-Identifier: Apache-2.0
|
2
|
-
"""Evaluation blocks for SDG Hub."""
|
3
|
-
|
4
|
-
# Local
|
5
|
-
from .evaluate_faithfulness_block import EvaluateFaithfulnessBlock
|
6
|
-
from .evaluate_relevancy_block import EvaluateRelevancyBlock
|
7
|
-
from .verify_question_block import VerifyQuestionBlock
|
8
|
-
|
9
|
-
__all__ = ["EvaluateFaithfulnessBlock", "EvaluateRelevancyBlock", "VerifyQuestionBlock"]
|