Skip to content

Feature/semantic scholar tool#32

Merged
NISH1001 merged 3 commits into
feature/atomic-lit-agentfrom
feature/semantic-scholar-tool
May 5, 2025
Merged

Feature/semantic scholar tool#32
NISH1001 merged 3 commits into
feature/atomic-lit-agentfrom
feature/semantic-scholar-tool

Conversation

@NISH1001
Copy link
Copy Markdown
Collaborator

@NISH1001 NISH1001 commented May 5, 2025

Summary 📝

This PR introduces a semantic-scholar-based search tool SemanticScholarSearchTool following the same semantics as other search tool within the repo. The idea is to have open access literature search that will be aligned to the open science policy.

Details

Describe more what you did on changes.

  1. Added akd.tools.search.SemanticScholarSearchTool which can be used as a drop-in replacement to existing akd.tools.search.SearxngSearchTool
  2. Added akd.tools.search.SemanticScholarSearchConfig as a config for the s2
  3. Added akd.tools.search.SemanticScholarInputSchema and SemanticScholarOutputSchema for IO.

Bugfixes 🐛 (delete if dind't have any)

  • Removed publication date from the title in SearxngSearchTool when fetching the content.
  • Added akd.structures.SearchResultItem.title_augmented field to the model that adds publication date to the title which can be used for downstream year-based filtering.

Usage

from akd.tools.search import (
    SemanticScholarSearchToolConfig,
    SemanticScholarSearchToolInputSchema,
    SemanticScholarSearchTool
)

search_cfg = SemanticScholarSearchToolConfig(debug=True)

search_tool = SemanticScholarSearchTool(
    config=search_cfg
)

result = await ss_tool.arun(
    SemanticScholarSearchToolInputSchema(
        queries=["landslide nepal 2024"],
        max_results=5
    )
)

NISH1001 added 3 commits May 2, 2025 15:56
Add `akd.tools.search.SemanticScholarSearchTool` which behaves
semantically the same as existing search tool
- Also add `title_augmented` as computed field to
  `akd.structures.SearchResultItem`
@NISH1001 NISH1001 self-assigned this May 5, 2025
@NISH1001 NISH1001 merged commit 84a8a4d into feature/atomic-lit-agent May 5, 2025
@NISH1001 NISH1001 deleted the feature/semantic-scholar-tool branch May 5, 2025 15:43
@NISH1001 NISH1001 mentioned this pull request May 5, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant