Skip to content

Commit

Permalink
feat(networks): add weights topics for ia labelling
Browse files Browse the repository at this point in the history
ahonestla committed Jun 4, 2024
1 parent 27d9253 commit f9f0cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/api/networks/network/mistralai.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ async function mistralLabelsFromDomains(domains: string): Promise<string> {
role: "user",
content: `
You have been tasked with naming distinct fields of study for several communities of research publications.
Below are lists of topics representing each community.
Below are lists of topics and their weights representing each community.
Your goal is to provide a unique and descriptive name for each field of study that best encapsulates the essence of the topics within that community.
Each name should be unique and as short as possible.
Output as JSON object with the list number and the single generated name.
@@ -43,7 +43,7 @@ export async function openAiLabeledClusters(clusters: NetworkCommunities): Promi
const topDomains = Object.entries(cluster.domains)
.sort((a: [string, number], b: [string, number]) => b[1] - a[1])
.slice(0, 10)
.map(([domain]) => `${domain}`)
.map(([domain, count]) => `${domain} (${count})`)
.join(", ")

acc = acc + `${prefix}${index + 1} = [${topDomains}], `

0 comments on commit f9f0cf2

Please sign in to comment.