prebuilt.essay_grading¶
Essay Grading - TODO: Add brief description.
TODO: Add detailed description of module functionality
Examples
Basic usage:
from haive.essay_grading import module_function
# TODO: Add example
Classes¶
Placeholder for base LLM configuration. |
|
dict() -> new empty dictionary |
|
Agent for reviewing the grammar and bias of an article. |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
Functions¶
|
This node handles the categorization of the user input to identify the intended actions. |
|
Split large text into manageable chunks. |
|
Fact-check the given text by identifying factual inaccuracies, misleading information, unsupported claims, or vague language. |
|
Fact Checking Node. |
|
This function gets the article text from the state and splits it into manageable chunks. |
|
Identify the user's intended actions based on their input. |
|
Grammar And Bias Review Node. |
|
Review the given article text for grammar, spelling, punctuation, and bias. |
|
Extract direct quotes from the given article text. |
|
Quote Extraction Node. |
|
Route. |
|
Search for keyword and summarize results. |
|
This node generates a summary of the article text. |
|
Summarize the article. |
|
Analyze the tones of the given article text. |
|
Tone Analysis Node. |
Package Contents¶
- class prebuilt.essay_grading.BaseLLMConfig¶
Placeholder for base LLM configuration.
- class prebuilt.essay_grading.FactCheckResult¶
Bases:
TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- class prebuilt.essay_grading.JournamlsimReviewAgent(llm)¶
Bases:
haive.agents.base.agent.Agent
Agent for reviewing the grammar and bias of an article.
Init .
- Parameters:
llm (BaseLLMConfig) – [TODO: Add description]
- setup_workflow()¶
Setup Workflow.
- class prebuilt.essay_grading.State¶
Bases:
TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- class prebuilt.essay_grading.SystemAction¶
Bases:
TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- prebuilt.essay_grading.categorize_user_input(state)¶
This node handles the categorization of the user input to identify the intended actions.
- prebuilt.essay_grading.chunk_large_text(text)¶
Split large text into manageable chunks.
- prebuilt.essay_grading.fact_check_article(article_text, chunks=None)¶
Fact-check the given text by identifying factual inaccuracies, misleading information, unsupported claims, or vague language.
- Parameters:
article_text (str)
- prebuilt.essay_grading.fact_checking_node(state)¶
Fact Checking Node.
- Parameters:
state (State) – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.get_or_create_chunks(state)¶
This function gets the article text from the state and splits it into manageable chunks. The chunks are stored in the state to avoid recomputing them multiple times.
- Parameters:
state (State)
- prebuilt.essay_grading.get_user_actions(input_text)¶
Identify the user’s intended actions based on their input.
- prebuilt.essay_grading.grammar_and_bias_review_node(state)¶
Grammar And Bias Review Node.
- Parameters:
state (State) – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.grammary_and_bias_analysis_article(article_text, chunks=None)¶
Review the given article text for grammar, spelling, punctuation, and bias.
- Parameters:
article_text (str)
- prebuilt.essay_grading.quote_extraction_article(article_text, chunks=None)¶
Extract direct quotes from the given article text.
- Parameters:
article_text (str)
- prebuilt.essay_grading.quote_extraction_node(state)¶
Quote Extraction Node.
- Parameters:
state (State) – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.route(state)¶
Route.
- Parameters:
state (State) – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.search_and_summarize(keyword)¶
Search for keyword and summarize results.
- prebuilt.essay_grading.summarization_node(state)¶
This node generates a summary of the article text.
- prebuilt.essay_grading.summarize_article(article_text, chunks)¶
Summarize the article.