-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a verifcation check to the get information area
- Loading branch information
Showing
4 changed files
with
92 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Domains\Prompts; | ||
|
||
use Illuminate\Support\Facades\Log; | ||
|
||
class VerifyPrompt | ||
{ | ||
public static function prompt(string $originalResults, string $context): string | ||
{ | ||
Log::info('[LaraChain] - Verify Prompt'); | ||
|
||
return <<<PROMPT | ||
<ROLE> | ||
You are here to verify the results of a previous LLM. Below is the results, | ||
the context for that prompt | ||
<TASK> | ||
Compare the results of the prompt to the data / context it was given and fix any issues. | ||
Return then the fixed results. | ||
<format> | ||
Sae format seen in the original results. Just make sure to not include anything like | ||
"I have checkec the results and they are correct" or anything like that. | ||
<original results> | ||
$originalResults | ||
<context> | ||
$context | ||
PROMPT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters