Skip to content

Latest commit

 

History

History
173 lines (109 loc) · 5.98 KB

README.md

File metadata and controls

173 lines (109 loc) · 5.98 KB

AI Scopus Agent

AI-Scopus-Agent Icon This Streamlit web application, AI-Scopus-Agent, allows users to search for academic publications using the Scopus database and summarizes the results using the Llama-3-Groq language model. The app leverages the scopus_search tool to retrieve publications based on user-defined queries and provides detailed results along with a concise summary.

Video Demo

Watch the demonstration video below:

Watch the video


Features

  • Advanced Scopus Search: Construct queries using Scopus' advanced search syntax to find relevant academic publications.
  • Detailed Results: View comprehensive details for each publication, including title, authors, journal, publication year, DOI, abstract, and direct links.
  • Summarization: Receive a summarized overview of the search results generated by the Llama-3-Groq model.
  • User-Friendly Interface: Interact with a simple and intuitive web interface powered by Streamlit.

Prerequisites

Before running AI-Scopus-Agent, ensure you have the following:

  • Python 3.7 or higher
  • API Keys:
    • GROQ API Key: Required to access the Llama-3-Groq model.
    • Scopus API Key: Required to access the Scopus API.

Installation

  1. Clone the Repository

    git clone https://github.com/Mohamed-Elnahla/AI-Scopus-Agent.git
    cd AI-Scopus-Agent
  2. Create a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Required Libraries

    Install all necessary packages using pip:

    pip install -r requirements.txt

    Note: Since langchain_core and langchain_groq are specific to this implementation, ensure they are installed correctly. If they are not available on PyPI, you may need to install them from a private repository or source.

  4. Set Up API Keys

    Create a .streamlit directory in the project folder:

    mkdir -p .streamlit

    Inside the .streamlit directory, create a secrets.toml file:

    touch .streamlit/secrets.toml

    Add your API keys to secrets.toml:

    GROQ_API_KEY = "your_groq_api_key"
    SCOPUS_API_KEY = "your_scopus_api_key"

    Replace "your_groq_api_key" and "your_scopus_api_key" with your actual API keys.

    Security Notice: Ensure that the secrets.toml file is kept secure and is not committed to any public repositories. Add .streamlit/ to your .gitignore file.

Usage

Run the Streamlit app using the following command:

streamlit run app.py

This will start AI-Scopus-Agent and open it in your default web browser.

How to Use the App

  1. Enter Your Query

    • In the text input field, enter your search query using Scopus' advanced search syntax.
  2. Execute the Search

    • Click the Search button to execute the query.
    • The app will process your input, retrieve relevant publications, and display the detailed results.
  3. View Detailed Results

    • The results include the title, authors, journal information, DOI with a direct link, abstract, and a link to the full text if available.
  4. Read the Summary

    • Below the detailed results, the app provides a summarized overview of the search results generated by the Llama-3-Groq model.

Dependencies

AI-Scopus-Agent relies on the following key libraries:

  • Streamlit: For the web interface.
  • Requests: To make HTTP requests to the Scopus API.
  • LangChain Core: For handling the language model interactions.
  • LangChain Groq: For integrating the Llama-3-Groq model.
  • Textwrap: For formatting text.
  • JSON: For handling JSON data.

Ensure all dependencies are installed and properly configured.

Troubleshooting

  • API Key Errors: If you encounter errors related to API keys, double-check that your keys are correctly set in the secrets.toml file and that they are valid.
  • Module Not Found: If Python cannot find langchain_core or langchain_groq, ensure they are installed in your environment. You may need to install them from a private repository or source if they are not publicly available.
  • Network Issues: Ensure you have a stable internet connection, as the app makes external API calls.
  • Unsupported Queries: If your Scopus query returns no results or an error, verify that your query adheres to Scopus' search syntax guidelines.

Contributing

Contributions to AI-Scopus-Agent are welcome! If you'd like to enhance the app or fix issues:

  1. Fork the repository.

  2. Create a new branch:

    git checkout -b feature/YourFeature
  3. Commit your changes:

    git commit -m "Add your message"
  4. Push to the branch:

    git push origin feature/YourFeature
  5. Open a pull request.

License

This project is licensed under the following License. See the LICENSE file for details.

Acknowledgements

  • Streamlit: For providing an excellent framework for creating web apps.
  • Scopus API: For access to a vast database of academic publications.
  • Groq and Llama-3-Groq Model: For advanced language processing capabilities.

Contact

For any questions or suggestions, please contact: