Skip to content

[RFC] Files Recommendations: Improve algorithm and data sources #888

Open

Description

@skjnldsv

Goals

I think we can improve the current state.
Right now we support three providers:

  • Recently Commented
  • Recently Edited
  • Recently Shared

Sources suggestions

  • Recently Accessed
  • Recently Uploaded (because we keep the mtime when uploading, so new files might not appear as Recently Edited)
  • Frequently Accessed
  • Time of day: Accessed files during specific time of days ?

Aggregation bonus

  • Some data could be regrouped too. Like if you frequently access more than x files in the same folder, also recommend the folder directly?

Distribution

I also suggest to add a weight combining score
Something that can be fined tuned over time, but we could weight the relevancy of a result if it matches multiple criterias (dumb values used for this example below)

$score = (
    0.3 * $recencyScore +
    0.2 * $frequencyScore +
    0.1 * $editScore +
    0.1 * $sharedScore +
    0.1 * $commentedScore
);

Activity

  1. provokateurin commented on Jun 26, 2025

    @provokateurin
    Member

    There was already #856 which lists a bunch of issues with ideas for improvements.

  2. changed the title [-][RFC] Improve algorithm and data sources[/-] [+][RFC] Files Recommendations: Improve algorithm and data sources[/+] on Jul 30, 2025
  3. jancborchardt commented on Jul 30, 2025

    @jancborchardt
    Member

    The biggest issue I have with recommendations right now is that the files are usually not relevant for me at all. E.g. if you check your recommended files on our company instance, it is likely to be marketing files.

    What would be nice if we can consider or prefer things like:

    • Folders/files which are your favorites
    • Folders/files which you often open and use
    • Folders/files which your closest colleagues use and modify
    • Somehow factoring in other things, like e.g. currently I consider the conference-related documents important (the ones Eirini shared for us to fill in)
    • Probably more

    This would help to limit the amount of files we are looking at, and thus help show you more relevant ones.

  4. jancborchardt commented on Jul 30, 2025

    @jancborchardt
    Member

    FYI @kra-mo if you have further ideas regarding this. :)

  5. moved this to 🏗️ At engineering in 🖍 Design teamon Jul 30, 2025
  6. skjnldsv commented on Jul 30, 2025

    @skjnldsv
    MemberAuthor

    I was currently working on Frequently Accessed.
    I guess adding the favorite would not be that hard
    And if we do the last point of my post, it should help us adjust which source is most important :)

    1. Finish Frequently Accessed
    2. Add Favourites
    3. Implement weighted source float number
    4. Test and adjust to see what make sense best
  7. jancborchardt commented on Sep 3, 2025

    @jancborchardt
    Member

    @skjnldsv any news regarding this by the way, or something that could need review, or where you need input? :)

  8. skjnldsv commented on Sep 3, 2025

    @skjnldsv
    MemberAuthor

    @skjnldsv any news regarding this by the way, or something that could need review, or where you need input? :)

    It's been postponed and I'm on vacations :)

  9. theking2 commented on Apr 29, 2026

    @theking2

    how about a magic file like .ignore in a folder that should be ignored by the algorithm.

  10. Freundschaft commented on Oct 29, 2026

    @Freundschaft

    ive built a plugin which just shows me the last files ive opened and its already quite useful: https://github.com/Freundschaft/nextcloud-last-opened-plugin

  11. skjnldsv commented on Oct 29, 2026

    @skjnldsv
    MemberAuthor

    Picking this up again. Here's the plan, roughly 2–2.5 weeks in total.

    The tricky source is "Recently/Frequently Accessed". BeforeNodeReadEvent fires for sync clients, previews and thumbnails, so counting reads would mostly measure what the desktop client touched. Tuning the weights can't fix that, the noise and the real opens end up in the same number.

    So I'd count actual opens instead:

    • Server gets a public OCS endpoint to say "I opened this file", and dispatches a NodeOpenedEvent any app can listen to. It's new API, so it gets its own PR first.
    • The viewer calls it on the initial open(). Prev/next browsing doesn't count, so swiping through a gallery isn't 200 opens. Files, Talk, Deck, Text and Office all go through the viewer.
    • The "Open locally" action in Files calls it too. Desktop and mobile clients can call it when a user opens a file, if they want those opens to count.
    • Recommendations stores the opens (with a cleanup job) and turns them into recent and frequent sources.

    Then favorites, recently uploaded (via upload_time), and a weighted score that replaces the plain timestamp sort, so a file that matches several sources ranks higher.

    Recommending whole folders, files your colleagues use, and an ignore marker are separate follow-ups. The opens source only works on 36+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions