Skip to content

Commit

Permalink
prompt / test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CiaranMn committed Jan 15, 2025
1 parent f165594 commit 76a490d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const matchTestData: MatchExistingEntityTest[] = [
inputData: {
potentialMatches: [
{
entityId: ceoStarted2020Uuid,
entityId: generateEntityId(),
metadata: {
entityTypeIds: [
"https://hash.ai/@hash/types/entity-type/worked-at/v/1",
Expand All @@ -310,7 +310,7 @@ const matchTestData: MatchExistingEntityTest[] = [
},
properties: {
[systemPropertyTypes.role.propertyTypeBaseUrl]: "CEO",
[systemPropertyTypes.appliesFrom.propertyTypeBaseUrl]: "2022-04-22",
[systemPropertyTypes.appliesFrom.propertyTypeBaseUrl]: "2011-04-22",
},
propertiesMetadata: emptyMetadataObject,
},
Expand Down Expand Up @@ -420,13 +420,11 @@ test(
async () => {
const models: LlmParams["model"][] = [
"claude-3-haiku-20240307",
"claude-3-5-sonnet-20240620",
"gpt-4o-mini-2024-07-18",
"gpt-4o-2024-08-06",
];

await optimizeSystemPrompt({
attemptsPerPrompt: 10,
attemptsPerPrompt: 8,
models,
initialSystemPrompt: matchExistingEntitySystemPrompt,
directoryPath: baseDirectoryPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ ${potentialMatches
Do any of the potential matches match the new entity?
If so, please provide the entityId of the match, and merged versions of properties which are suitable for merging.
Remember to pay close attention to each property you are provided with.
Differences in some properties between the new entity and the potential matches will make it clear that the entities do NOT match, e.g. because they refer to different dates, versions, roles, values, actors involved, etc.
Check differences in property values to see if they are significant.
${previousError ? `Your previous response had an error – please do not repeat it: ${previousError}` : ""}`;
};

Expand Down

0 comments on commit 76a490d

Please sign in to comment.