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
Submodules¶
Attributes¶
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:
TypedDictdict() -> 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)
- class prebuilt.essay_grading.JournamlsimReviewAgent(llm: BaseLLMConfig)¶
Bases:
haive.agents.base.agent.AgentAgent for reviewing the grammar and bias of an article.
- setup_workflow()¶
Setup Workflow.
- graph = None¶
- class prebuilt.essay_grading.State¶
Bases:
TypedDictdict() -> 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)
- class prebuilt.essay_grading.SystemAction¶
Bases:
TypedDictdict() -> 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)
- prebuilt.essay_grading.categorize_user_input(state: State) State¶
This node handles the categorization of the user input to identify the intended actions.
- prebuilt.essay_grading.chunk_large_text(text: str) List[str]¶
Split large text into manageable chunks.
- prebuilt.essay_grading.fact_check_article(article_text: str, chunks=None)¶
Fact-check the given text by identifying factual inaccuracies, misleading information, unsupported claims, or vague language.
- prebuilt.essay_grading.fact_checking_node(state: State) State¶
Fact Checking Node.
- Parameters:
state – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.get_or_create_chunks(state: 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.
- prebuilt.essay_grading.get_user_actions(input_text: str) List[str]¶
Identify the user’s intended actions based on their input.
- prebuilt.essay_grading.grammar_and_bias_review_node(state: State) State¶
Grammar And Bias Review Node.
- Parameters:
state – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.grammary_and_bias_analysis_article(article_text: str, chunks=None)¶
Review the given article text for grammar, spelling, punctuation, and bias.
- prebuilt.essay_grading.quote_extraction_article(article_text: str, chunks=None)¶
Extract direct quotes from the given article text.
- prebuilt.essay_grading.quote_extraction_node(state: State) State¶
Quote Extraction Node.
- Parameters:
state – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.route(state: State) str¶
Route.
- Parameters:
state – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.search_and_summarize(keyword: str) str¶
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: str, chunks: List[str]) str¶
Summarize the article.
- prebuilt.essay_grading.tone_analysis_article(article_text: str, chunks=None)¶
Analyze the tones of the given article text.
- prebuilt.essay_grading.tone_analysis_node(state: State) State¶
Tone Analysis Node.
- Parameters:
state – [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- prebuilt.essay_grading.action_pipeline¶
- prebuilt.essay_grading.action_prompt¶
- prebuilt.essay_grading.fact_checking_pipeline¶
- prebuilt.essay_grading.fact_checking_prompt¶
- prebuilt.essay_grading.grammar_and_bias_review¶
- prebuilt.essay_grading.llm = None¶
- prebuilt.essay_grading.quote_extraction_pipeline¶
- prebuilt.essay_grading.quote_extraction_prompt¶
- prebuilt.essay_grading.review_prompt¶
- prebuilt.essay_grading.routes¶
- prebuilt.essay_grading.structured_output_llm¶
- prebuilt.essay_grading.tone_analysis_prompt¶
- prebuilt.essay_grading.tone_pipeline¶
- prebuilt.essay_grading.user_actions¶
- prebuilt.essay_grading.user_inputs = ['Can you summarize this article for me?', "I'm not sure about the accuracy of this article. Can...¶