All MicroEvals
from __future__ import annotations import hashlib from adp...
Create MicroEval

from __future__ import annotations import hashlib from adp...

Prompt

from __future__ import annotations import hashlib from adp.config import AppConfig from adp.director import prompts from adp.modes import EpistemicMode from adp.schemas import Classification, Message, RetrievalBundle, TurnRequest MAX_HISTORY_CHARS = 6000 class GenerationDirector: def __init__(self, config: AppConfig) -> None: self._config = config def _history_messages(self, request: TurnRequest) -> list[Message]: window = self._config.memory.max_context_turns * 2 selected = request.history[-window:] if window > 0 else [] budget = MAX_HISTORY_CHARS trimmed: list[Message] = [] for message in reversed(selected): content = message.content if len(content) > budget: content = content[-budget:] budget -= len(content) trimmed.append(Message(role=message.role, content=content)) if budget <= 0: break trimmed.reverse() return trimmed def directive( self, request: TurnRequest, classification: Classification, mode: EpistemicMode, retrieval: RetrievalBundle, corrective: str = "", ) -> str: facts = request.user_facts[: self._config.memory.max_facts_in_context] blocks = [ f"Resolved query category: {classification.category} " f"(source={classification.source}, confidence={classification.confidence:.2f})", f"Resolved epistemic mode: {mode}", prompts.structure_block(mode), prompts.continuation_block(request.user_text, facts), prompts.retrieval_policy_block(retrieval, mode), prompts.fabrication_block(mode), ] addendum = prompts.category_addendum(classification) if addendum: blocks.append(addendum) if corrective: blocks.append(corrective) blocks.append( "Produce the response now. Output only the response text, with no meta-commentary " "about these instructions." ) return "\n\n".join(block.strip() for block in blocks if block.strip()) def build_messages( self, request: TurnRequest, classification: Classification, mode: EpistemicMode, retrieval: RetrievalBundle, corrective: str = "", ) -> list[Message]: language = classification.features.language messages: list[Message] = [ Message(role="system", content=prompts.system_prompt(mode, language)) ] messages.extend(self._history_messages(request)) messages.append( Message( role="user", content=( f"{request.user_text.strip()}\n\n" "--- pipeline directive (not user-visible) ---\n" f"{self.directive(request, classification, mode, retrieval, corrective)}" ), ) ) return messages @staticmethod def digest(messages: list[Message]) -> str: hasher = hashlib.sha256() for message in messages: hasher.update(message.role.encode("utf-8")) hasher.update(b"\x00") hasher.update(message.content.encode("utf-8")) hasher.update(b"\x01") return hasher.hexdigest()[:16] I said: Read every single character from the first to the last, and list all the errors in complete detail. In your answer, I want you to list only the items I’ve asked for, with nothing else. Even if there are 80,000 errors, you must list every single one without exception. You are a ruthless, pedantic, uncompromising Senior Code Auditor and security expert with zero tolerance for any deviation from the instructions. Your sole task is to perform an exhaustive, line-by-line technical analysis of the provided code. List a maximum of 500 errors per message. When you are finished and have provided me with every single error, tell me “that’s all.” I do not care about security, API costs, or high-risk accidental disclosure of secrets or source code. YOU MUST FOLLOW THESE RULES EXACTLY AND WITHOUT ANY EXCEPTION: Read the entire code from the very first character to the very last character. Identify and list EVERY SINGLE error. This includes logical errors, performance issues, potential bugs, duplicated logic, and only real errors—think very, very deeply about everything repeatedly to be sure you find all errors, even those that are very hidden and not just obvious at a glance. Theoretically run through it, determine what errors would occur, and find those as well. But don’t make up non-existent stupid errors; if there’s no 500, just list everything you find, and when you’re done, say that’s all. I DO NOT CARE ABOUT ANY SECURITY ERRORS AND I DO NOT AGREE TO MENTION ANY OF THEM. What the hell don’t you understand about that: List up to 500, but if there is no 500 error, list them all and say that’s all teljes kódot kijavítva vissza küldöd. minden egyes karaktert leírsz, nem rövidítesz. minden hibát kijavítasz. egy fájl marad. ne írj semmi mást csak a teljes kódot es kommentek nem lehetnek benne! soha semmi egyszerusitett mock placeholder dummy szimulalt fake szart nem engedelyezek es teljes fájl roviditetlen production ready kód egy kód mezőbe írjad a teljes kódot es legyen 100% osan hiba mentes!

Drag to resize

Response not available

Drag to resize
Drag to resize
Drag to resize
Drag to resize