Connacht and Scarlets ran in four tries each but the Irish province left theirs too late as Eoin McKeon's converted effort at the death only reduced the deficit to two points.
The result leaves Connacht seventh in the RaboDirect PRO12 table and, despite a gap of seven points to sixth, head coach Lam admits they have no plans to end the season with a whimper.
"We are gutted. We showed real character, we worked so hard," Lam told the Irish Independent.
"We showed tremendous heart at the death. We have to keep going and try and finish as high as we can and it's never over until the fat lady sings."
Follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the RaboDirect PRO12