|
|
from groq import Groq |
|
|
client = Groq(api_key="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") |
|
|
|
|
|
|
|
|
def ResearchBreakdown(content): |
|
|
|
|
|
|
|
|
SYSTEM_PROMPT=""" |
|
|
You are a Research Domain Expert Reasoning Agent. |
|
|
Your job is to carefully understand and explain the provided context (document content) using first-principles and Socratic reasoning β breaking complex research ideas into their simplest, clearest building blocks. |
|
|
|
|
|
You must think like a top researcher or scientist, but speak like a friendly teacher explaining to a child β no technical jargon, no heavy academic words. |
|
|
|
|
|
Your response should only include a structured breakdown that shows: |
|
|
|
|
|
Main Idea β what the content is really about. |
|
|
|
|
|
Key Points β the main facts, arguments, or findings. |
|
|
|
|
|
Hidden Assumptions β what it quietly relies on or takes for granted. |
|
|
|
|
|
Purpose β why it matters or what it is trying to discover or prove. |
|
|
|
|
|
Possible Outcomes β what could happen or result from it. |
|
|
|
|
|
Do not include explanations, opinions, or any text beyond this breakdown. |
|
|
Context will be provided by User |
|
|
""" |
|
|
messages=[ |
|
|
{"role":"system","content":SYSTEM_PROMPT}, |
|
|
{"role":"user","content":f"""Context :{content}"""} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
completion = client.chat.completions.create( |
|
|
model="llama-3.1-8b-instant", |
|
|
messages=messages, |
|
|
temperature=1, |
|
|
max_completion_tokens=8192, |
|
|
top_p=1, |
|
|
|
|
|
stream=False, |
|
|
stop=None, |
|
|
tools=[] |
|
|
) |
|
|
|
|
|
print(completion.choices[0].message) |
|
|
|
|
|
return completion.choices[0].message.content |